From 4b1a12e4222f7f44af0d267d7d095fe61645a1e9 Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Tue, 18 Jun 2024 16:57:58 +0200 Subject: [PATCH] Add the exception thrown by the `load` method in the KDoc --- .../java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rich-html-editor/src/main/java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt b/rich-html-editor/src/main/java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt index 73d4d19..3d96bd6 100644 --- a/rich-html-editor/src/main/java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt +++ b/rich-html-editor/src/main/java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt @@ -41,6 +41,8 @@ class EditorReloader(private val coroutineScope: CoroutineScope) { * } * } * ``` + * + * @throws IllegalStateException If the method is not called on the main thread. */ suspend fun load(editor: RichHtmlEditorWebView, defaultHtml: String) { if (Looper.myLooper() != Looper.getMainLooper()) error("The load method needs to be called on the main thread")