Skip to content

Replace ValueError with info attribute with SlycotError #99

@roryyorke

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.

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