/** * PUBLIC: * Print both the normal and internal stack traces. */ public void printStackTrace(PrintWriter writer) { writer.write(ExceptionMessageGenerator.getHeader("LocalExceptionStackHeader")); writer.write(cr()); super.printStackTrace(writer); if ((getInternalException() != null) && shouldPrintInternalException()) { writer.write(ExceptionMessageGenerator.getHeader("InternalExceptionStackHeader")); writer.write(cr()); getInternalException().printStackTrace(writer); if ((getInternalException() instanceof java.lang.reflect.InvocationTargetException) && ((((java.lang.reflect.InvocationTargetException)getInternalException()).getTargetException()) != null)) { writer.write(ExceptionMessageGenerator.getHeader("TargetInvocationExceptionStackHeader")); writer.write(cr()); ((java.lang.reflect.InvocationTargetException)getInternalException()).getTargetException().printStackTrace(writer); } } writer.flush(); }
/** * PUBLIC: * Print both the normal and internal stack traces. */ public void printStackTrace(PrintWriter writer) { writer.write(ExceptionMessageGenerator.getHeader("LocalExceptionStackHeader")); writer.write(cr()); super.printStackTrace(writer); if ((getInternalException() != null) && shouldPrintInternalException()) { writer.write(ExceptionMessageGenerator.getHeader("InternalExceptionStackHeader")); writer.write(cr()); getInternalException().printStackTrace(writer); if ((getInternalException() instanceof java.lang.reflect.InvocationTargetException) && ((((java.lang.reflect.InvocationTargetException) getInternalException()).getTargetException()) != null)) { writer.write(ExceptionMessageGenerator.getHeader("TargetInvocationExceptionStackHeader")); writer.write(cr()); ((java.lang.reflect.InvocationTargetException) getInternalException()).getTargetException().printStackTrace(writer); } } writer.flush(); }
/** * PUBLIC: * Print both the normal and internal stack traces. */ public void printStackTrace(PrintWriter writer) { writer.write(ExceptionMessageGenerator.getHeader("LocalExceptionStackHeader")); writer.write(cr()); super.printStackTrace(writer); if ((getInternalException() != null) && shouldPrintInternalException()) { writer.write(ExceptionMessageGenerator.getHeader("InternalExceptionStackHeader")); writer.write(cr()); getInternalException().printStackTrace(writer); if ((getInternalException() instanceof java.lang.reflect.InvocationTargetException) && ((((java.lang.reflect.InvocationTargetException) getInternalException()).getTargetException()) != null)) { writer.write(ExceptionMessageGenerator.getHeader("TargetInvocationExceptionStackHeader")); writer.write(cr()); ((java.lang.reflect.InvocationTargetException) getInternalException()).getTargetException().printStackTrace(writer); } } writer.flush(); }
/** * PUBLIC: * Return the exception error message. * EclipseLink error messages are multi-line so that detail descriptions of the exception are given. */ public String getMessage() { StringWriter writer = new StringWriter(100); // Avoid printing internal exception error message twice. if ((getInternalException() == null) || ((super.getMessage() != null) && !super.getMessage().equals(getInternalException().toString()))) { writer.write(cr()); writer.write(getIndentationString()); writer.write(ExceptionMessageGenerator.getHeader("DescriptionHeader")); writer.write(super.getMessage()); } if (getInternalException() != null) { writer.write(cr()); writer.write(getIndentationString()); writer.write(ExceptionMessageGenerator.getHeader("InternalExceptionHeader")); writer.write(getInternalException().toString()); if ((getInternalException() instanceof java.lang.reflect.InvocationTargetException) && ((((java.lang.reflect.InvocationTargetException) getInternalException()).getTargetException()) != null)) { writer.write(cr()); writer.write(getIndentationString()); writer.write(ExceptionMessageGenerator.getHeader("TargetInvocationExceptionHeader")); writer.write(((java.lang.reflect.InvocationTargetException) getInternalException()).getTargetException().toString()); } } return writer.toString(); }
/** * PUBLIC: * Return the exception error message. * EclipseLink error messages are multi-line so that detail descriptions of the exception are given. */ public String getMessage() { StringWriter writer = new StringWriter(100); // Avoid printing internal exception error message twice. if ((getInternalException() == null) || ((super.getMessage() != null) && !super.getMessage().equals(getInternalException().toString()))) { writer.write(cr()); writer.write(getIndentationString()); writer.write(ExceptionMessageGenerator.getHeader("DescriptionHeader")); writer.write(super.getMessage()); } if (getInternalException() != null) { writer.write(cr()); writer.write(getIndentationString()); writer.write(ExceptionMessageGenerator.getHeader("InternalExceptionHeader")); writer.write(getInternalException().toString()); if ((getInternalException() instanceof java.lang.reflect.InvocationTargetException) && ((((java.lang.reflect.InvocationTargetException) getInternalException()).getTargetException()) != null)) { writer.write(cr()); writer.write(getIndentationString()); writer.write(ExceptionMessageGenerator.getHeader("TargetInvocationExceptionHeader")); writer.write(((java.lang.reflect.InvocationTargetException) getInternalException()).getTargetException().toString()); } } return writer.toString(); }
/** * PUBLIC: * Return the exception error message. * EclipseLink error messages are multi-line so that detail descriptions of the exception are given. */ public String getMessage() { StringWriter writer = new StringWriter(100); // Avoid printing internal exception error message twice. if ((getInternalException() == null) || ((super.getMessage() != null) && !super.getMessage().equals(getInternalException().toString()))) { writer.write(cr()); writer.write(getIndentationString()); writer.write(ExceptionMessageGenerator.getHeader("DescriptionHeader")); writer.write(super.getMessage()); } if (getInternalException() != null) { writer.write(cr()); writer.write(getIndentationString()); writer.write(ExceptionMessageGenerator.getHeader("InternalExceptionHeader")); writer.write(getInternalException().toString()); if ((getInternalException() instanceof java.lang.reflect.InvocationTargetException) && ((((java.lang.reflect.InvocationTargetException)getInternalException()).getTargetException()) != null)) { writer.write(cr()); writer.write(getIndentationString()); writer.write(ExceptionMessageGenerator.getHeader("TargetInvocationExceptionHeader")); writer.write(((java.lang.reflect.InvocationTargetException)getInternalException()).getTargetException().toString()); } } return writer.toString(); }