Skip to content

Feature: Unify System.Exception with BaseException #1816

Open
@Lamparter

Description

@Lamparter

Note

This issue is the perfect opportunity to demonstrate the new issue templates introduced in #1812!

📄 Description

Currently, raising a .NET exception that derives from System.Exception using the raise keyword results in the following error: TypeError: exceptions must derive from BaseException.
The IronPython compiler should allow exceptions from .NET classes to be raised using Python's built in raise function.

🗃️ Alternative solutions

  • Replace BaseException entirely with System.Exception (best)
  • Allow BaseException and System.Exception to co-exist as different types of exceptions

👥 Intended Use-Case

This would allow for better use of the existing CLR exception types.

📸 Assets

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NET interopIssues relating to how IronPython interacts with .NET types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions