You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Raise typed exceptions instead of bare Exception #310
The builders, type inference, SQL frontend and derivation-expression code raise plain Exception in about 42 places. For example, "No matching overload for 'add' …" comes from type inference. Callers can't tell these failures apart from other errors without matching on the message.
Proposal: add a small hierarchy under a common base, e.g. SubstraitError(Exception) with subclasses such as FunctionResolutionError and SchemaError. Fit the existing DerivationExpressionParseError and UnrecognizedSubstraitTypeError into it. Use TypeError where ruff's TRY004 flags an isinstance check. Every new class still subclasses Exception, so existing except Exception handlers keep working.
When this is done, remove TRY002/TRY004 from lint.extend-ignore in pyproject.toml (added in #305).
Activity