Skip to content

Allow raising .NET exception classes - #2141

Merged
slozier merged 1 commit into
IronLanguages:mainfrom
slozier:gh1816
Nov 4, 2026
Merged

slozier merged 1 commit into
IronLanguages:mainfrom
slozier:gh1816

Conversation

@slozier

@slozier slozier commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Allow raising .NET exception classes (similar to Python BaseException subclasses):

raise System.InvalidCastException

Also applies to throw() on generators, coroutines and async generators.

Resolves #1816

@slozier
slozier merged commit ec6b134 into IronLanguages:main Nov 4, 2026
35 checks passed
@slozier
slozier deleted the gh1816 branch November 4, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Unify System.Exception with BaseException

1 participant