You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To beginners it's surprising that try! can only be used within a function with a Result return type, which in particular means it cannot be used from main. In the past we've mulled over language-level support for solving this problem but ultimately maybe we just need a better error message. How hard would it be to just detect try! being called from within main and give a nice and specific error message?
The text was updated successfully, but these errors were encountered:
To beginners it's surprising that
try!
can only be used within a function with aResult
return type, which in particular means it cannot be used from main. In the past we've mulled over language-level support for solving this problem but ultimately maybe we just need a better error message. How hard would it be to just detecttry!
being called from within main and give a nice and specific error message?The text was updated successfully, but these errors were encountered: