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
Copy file name to clipboardExpand all lines: docs/exception-handling.md
+14-7
Original file line number
Diff line number
Diff line change
@@ -78,9 +78,10 @@ Caught ArithmeticException
78
78
79
79
### CoroutineExceptionHandler
80
80
81
-
But what if one does not want to print all exceptions to the console?
82
-
[CoroutineExceptionHandler] context element is used as generic `catch` block of coroutine where custom logging or exception handling may take place.
83
-
It is similar to using [`Thread.uncaughtExceptionHandler`](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler)).
81
+
What if one does not want to print all exceptions to the console?
82
+
[CoroutineExceptionHandler] context element on a _root_ coroutine can be used as generic `catch` block for
83
+
this root coroutine and all its children where custom logging or exception handling may take place.
84
+
It is similar to [`Thread.uncaughtExceptionHandler`](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler)).
84
85
85
86
On JVM it is possible to redefine global exception handler for all coroutines by registering [CoroutineExceptionHandler] via
0 commit comments