From 11fafaabc0bcdb4df04e701e67eec80eb0e54522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Sch=C3=B8nemann?= Date: Wed, 22 Apr 2020 10:36:05 +0200 Subject: [PATCH] Mention that the copied exception's message must be like the original --- docs/debugging.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/debugging.md b/docs/debugging.md index 6c846f235d..dd2993e3e4 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -61,6 +61,7 @@ Exception copy logic is straightforward: 2) If the exception class has class-specific fields not inherited from Throwable, the exception is not copied. 3) Otherwise, one of the public exception's constructor is invoked reflectively with an optional `initCause` call. +In any case, the copied exception *must have the same* `message` field as the original exception. ## Debug agent [kotlinx-coroutines-debug](../kotlinx-coroutines-debug) module provides one of the most powerful debug capabilities in `kotlinx.coroutines`.