From 70aa2def63a74bef6212bf52f4f7b59450396965 Mon Sep 17 00:00:00 2001 From: Tom Z?hner <8282547+zoehneto@users.noreply.github.com> Date: Sun, 31 May 2020 19:09:20 +0200 Subject: [PATCH] Fix rtf sample error reporting --- samples/01_rtf/rtf.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/samples/01_rtf/rtf.html b/samples/01_rtf/rtf.html index 6ee7745..7dc2d65 100644 --- a/samples/01_rtf/rtf.html +++ b/samples/01_rtf/rtf.html @@ -95,10 +95,13 @@ function displayRtfFile(blob) { } }); } catch(e) { - if (e instanceof RTFJS.Error) + if (e instanceof RTFJS.Error) { $("#content").text("Error: " + e.message); - else throw e; + } + else { + throw e; + } } } function stringToBinaryArray(string) {