From 3e365d718af3cd941631d4a5745521f2ea8733f8 Mon Sep 17 00:00:00 2001 From: Volker Berlin Date: Sat, 23 Feb 2019 16:28:04 +0100 Subject: [PATCH] print already written text format to syserr if an exception occur to understand easer where the problem come from. --- src/de/inetsoftware/jwebassembly/JWebAssembly.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/de/inetsoftware/jwebassembly/JWebAssembly.java b/src/de/inetsoftware/jwebassembly/JWebAssembly.java index 187e3c7..0694a54 100644 --- a/src/de/inetsoftware/jwebassembly/JWebAssembly.java +++ b/src/de/inetsoftware/jwebassembly/JWebAssembly.java @@ -157,8 +157,13 @@ public class JWebAssembly { */ public String compileToText() throws WasmException { StringBuilder output = new StringBuilder(); - compileToText( output ); - return output.toString(); + try { + compileToText( output ); + return output.toString(); + } catch( Exception ex ) { + System.err.println( output ); + throw ex; + } } /**