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
Rule 1: don't catch asynchronous exceptions of others
Exceptions of others have their own semantics. If you catch them, your code does not work well. For instance, if you use the async library and catch AsyncCancelled, a thread tree created by concurrently cannot be destroyed.
If you use SomeException for catch, handle or try, check if the caught exception is asynchronous. And re-throw it via throwIO if asynchrnous. You can use the following code to check asynchronous or not.
Rule 1: don't catch asynchronous exceptions of others
Exceptions of others have their own semantics. If you catch them, your code does not work well. For instance, if you use the
async
library and catchAsyncCancelled
, a thread tree created byconcurrently
cannot be destroyed.If you use
SomeException
forcatch
,handle
ortry
, check if the caught exception is asynchronous. And re-throw it viathrowIO
if asynchrnous. You can use the following code to check asynchronous or not.Rule2: catch the asynchronous exception which you are using
If you don't catch, the exceptions are leaked from your threads. GHC RTS catches them and displays them to sdout.
If you are using
time-manager
and don't want to leakTimeoutThread
, catch it.The text was updated successfully, but these errors were encountered: