Skip to content

Replace ValueError with info attribute with SlycotError #99

Description

@roryyorke

See #84 (comment)

A common pattern in the Slycot code is

        e = ValueError('the number of eigenvalues to be assigned is less than the number of possibly assignable eigenvalues')
        e.info = info
        raise e

The idea is to have a SlycotError class, so that this can be:

    raise SlycotError(msg, info)

instead - that way one can't forget the .info attribute.

I'd have had SlycotError inherit from RuntimeError, but for backward compatibility it should probably be ValueError.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions