JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
85 stars 3 forks source link

Handle should also work with direct class names #422

Closed JSAbrahams closed 1 year ago

JSAbrahams commented 1 year ago

Current Issue

Handle arms always expect an expression type. However, what if we don't need to have the name of the error? Do we then not want to just have an identifier identifying the exception class. Alternatively we can throw an error if it is not an expression type, thus always forcing an (empty) identifier.
This is better than failing silently.

High-level description of the feature

Either

Description of potential implementation

See generation for handle in check.