Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syntax for catching the new typed exceptions #19

Closed
JarrettBillingsley opened this issue Sep 19, 2011 · 0 comments
Closed

Add syntax for catching the new typed exceptions #19

JarrettBillingsley opened this issue Sep 19, 2011 · 0 comments
Assignees

Comments

@JarrettBillingsley
Copy link
Owner

Something like

try
   ...
catch(e: E1)
   ...
catch(e: E2|E3)
   ...

It'd be transformed by the compiler into:

try
   ...
catch(e)
{
   switch(e.super)
   {
      case E1: { first catch } break
      case E2, E3: { second catch } break
   }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant