diff --git a/src/tap/error/DefaultTAPErrorWriter.java b/src/tap/error/DefaultTAPErrorWriter.java index 6b390cb1..33c463c1 100644 --- a/src/tap/error/DefaultTAPErrorWriter.java +++ b/src/tap/error/DefaultTAPErrorWriter.java @@ -304,13 +304,13 @@ protected void putExceptionInfos(final Throwable t, final Map add // Add the list of all causes' message: if (causes.length() > 0) - addInfos.put("CAUSES", "\n" + nbCauses + causes.toString()); + addInfos.put("CAUSES", "\n" + nbCauses + "\n\n"); // added CDATA to wrap free text to make error document parsable // Add the stack trace of the original exception ONLY IF NOT A TAP NOR A UWS EXCEPTION (only unexpected error should be detailed to the users): if (!(lastCause instanceof TAPException && lastCause instanceof UWSException)){ ByteArrayOutputStream stackTrace = new ByteArrayOutputStream(); lastCause.printStackTrace(new PrintStream(stackTrace)); - addInfos.put("ORIGIN_STACK_TRACE", "\n" + nbStackTraces + "\n" + stackTrace.toString()); + addInfos.put("ORIGIN_STACK_TRACE", "\n" + nbStackTraces + "\n" + "\n\n"); // added CDATA to wrap free text to make error document parsable } } }