Exception reporting

Programmers may find providing as much information as possible under error conditions will help them identify faults in their server extensions.

For instance for a Java extension instead of just doing “SxsException (1234, exception.toString())” use something like the following:


StringWriter writer = new StringWriter();
exception.printStackTrace(new PrintWriter(writer));
SxsException (1234, writer.toString())



this will provide you with the exception message and stack trace.

For Direct extensions one unfortunately doesn’t have access to a stacktrace but you could use (FILE,LINE) to identify where the error is coming from.