Skip to content

Delete NotSufficientlySupportedException in v3: an unsupported operation returns null #1569

Description

@Rafael-SOWNet

Queued from #1559 (comment): in v3, NotSufficientlySupportedException is deleted and every unsupported operation returns null.

On master (882c1eb9) it is thrown at 12 places and caught at none, and 15 lines of the tests name it:

  • ToSymPy (6): argmax, argmin, the quantifiers, an indexed union or intersection over a set SymPy cannot list, an application of an undeclared lambda, and the nodes SymPy has no counterpart for.
  • Matrix serialisation (2): Serialize and Deserialize, both always.
  • Solve (3): an inequality the statement solver cannot read (Solvers.Definition.cs), a system of equations past its budget (EquationSolver.InSolveSystem), and a piecewise Boolean statement (BooleanAnalyticalSolver).
  • The special set of a domain (1): Domain.Any, or a value from outside the enum.

Docs/Usage/Exceptions.md, Docs/Contributing/NodeContract.md and Docs/Usage/Comparison.md describe it and change with it.

Activity

  1. added this to the 3.0 milestone on Sep 29, 2026
  2. Happypig375 commented on Sep 30, 2026

    @Happypig375
    Member

    In fact all exception types require a review to see if null-returns or returning a union type (think how you'd do it in functional languages like F#) is cleaner for the API shape instead. Presumably all exceptions are to be replaced with proper return types.

  3. Rafael-SOWNet commented on Sep 30, 2026

    @Rafael-SOWNet
    MemberAuthor

    Recorded in #1019 item 13: every exception type is to be reviewed for a null or union return, and the ones it listed as staying exceptions (misuse, AngouriBugException, the parse exceptions) are now candidates for that review, not exemptions.

  4. Happypig375 commented on Sep 30, 2026

    @Happypig375
    Member

    Maybe there are some exceptions (haha) that throwing would still be appropriate: the implicit string parsing for example to declare an entity easily with a string. But there doesn't seem to be more cases where this is wanted.

  5. Rafael-SOWNet commented on Sep 30, 2026

    @Rafael-SOWNet
    MemberAuthor

    Recorded in #1019 item 13: the implicit conversion from a string keeps throwing.

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

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions