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

Discuss a Catch All option in Try and Do #69

Closed
kingsleyh opened this issue Aug 7, 2018 · 3 comments
Closed

Discuss a Catch All option in Try and Do #69

kingsleyh opened this issue Aug 7, 2018 · 3 comments
Milestone

Comments

@kingsleyh
Copy link

Currently there is no catch all option for Try and Do - maybe we should have one?

@gdotdesign gdotdesign added this to the 0.3 milestone Aug 17, 2018
@gdotdesign
Copy link
Member

What do you think using catch without type and variable as the last block?

try {
} catch String => error {
} catch {
 /* This catches everything else. */
}

for do it would come before the finally block:

do {
} catch String => error {
} catch {
 /* This catches everything else. */
} finally {
}

@kingsleyh
Copy link
Author

Looks good :)

@gdotdesign gdotdesign mentioned this issue Sep 6, 2018
@gdotdesign
Copy link
Member

It's available in 0.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants