TimBurns
5 years agoNew Contributor III
SnapDataException is swallowing my stack trace string
I’m having an issue right now with how the SnapDataException handles a full stacktrace event.
Essentially this happens in developing snaps when we don’t have all the right jar files. The workaround is easy because I can set ERROR on output and check it, but it’s irritating because I’d like to have the Snap return an error and then show me the whole stack trace to troubleshoot.
} catch (Throwable e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
content.put("ERROR", sw.toString());
/*
TB - 4/15/21
SnapDataException is really irritating and will delete the error message.
You need to trap error in the pipeline or uncomment/comment this.
throw new SnapDataException(document,
String.format("Unexpected error: ", e.toString() + "/" + sw.toString()));*/
}