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
Note that in the upstream implementation the later panic overrides the earlier panic, and only one call to recover() is necessary. However, GopherJS requires a separate call to recover from each panic. While go spec isn't explicit about it, it doesn't say that there is some kind of stack of panics. Instead it only defines two states or "panicing" and "not panicing" and a successful recover() call clears the state of panicing and resumes normal execution.
The text was updated successfully, but these errors were encountered:
Consider the following code:
When executed by go:
When executed by GopherJS:
Note that in the upstream implementation the later panic overrides the earlier panic, and only one call to
recover()
is necessary. However, GopherJS requires a separate call to recover from each panic. While go spec isn't explicit about it, it doesn't say that there is some kind of stack of panics. Instead it only defines two states or "panicing" and "not panicing" and a successfulrecover()
call clears the state of panicing and resumes normal execution.The text was updated successfully, but these errors were encountered: