/** * Print the the trace of methods from where the error * originated. This will trace all nested exception * objects, as well as this object. * @param s The writer where the dump will be sent to. */ public void printStackTrace(java.io.PrintWriter s) { if (s == null) { s = new java.io.PrintWriter(System.err, true); } try { String locInfo = getLocationAsString(); if (null != locInfo) { s.println(locInfo); } super.printStackTrace(s); } catch (Throwable e) {} } }
private void logTransformerException(TransformerException e) { final StringBuilder message = new StringBuilder(e.getMessage()); if (e.getLocationAsString() != null) { message.append(" at ").append(e.getLocationAsString()); } m_logger.error(message.toString()); }
/** * Print the the trace of methods from where the error * originated. This will trace all nested exception * objects, as well as this object. * @param s The writer where the dump will be sent to. */ public void printStackTrace(java.io.PrintWriter s) { if (s == null) { s = new java.io.PrintWriter(System.err, true); } try { String locInfo = getLocationAsString(); if (null != locInfo) { s.println(locInfo); } super.printStackTrace(s); } catch (Throwable e) {} } }
/** * Print the the trace of methods from where the error * originated. This will trace all nested exception * objects, as well as this object. * @param s The writer where the dump will be sent to. */ public void printStackTrace(java.io.PrintWriter s) { if (s == null) { s = new java.io.PrintWriter(System.err, true); } try { String locInfo = getLocationAsString(); if (null != locInfo) { s.println(locInfo); } super.printStackTrace(s); } catch (Throwable e) {} } }
/** * Print the the trace of methods from where the error * originated. This will trace all nested exception * objects, as well as this object. * @param s The writer where the dump will be sent to. */ public void printStackTrace(java.io.PrintWriter s) { if (s == null) { s = new java.io.PrintWriter(System.err, true); } try { String locInfo = getLocationAsString(); if (null != locInfo) { s.println(locInfo); } super.printStackTrace(s); } catch (Throwable e) {} } }
/** * Print the the trace of methods from where the error * originated. This will trace all nested exception * objects, as well as this object. * @param s The writer where the dump will be sent to. */ public void printStackTrace(java.io.PrintWriter s) { if (s == null) { s = new java.io.PrintWriter(System.err, true); } try { String locInfo = getLocationAsString(); if (null != locInfo) { s.println(locInfo); } super.printStackTrace(s); } catch (Throwable e) {} } }
/** * Print the the trace of methods from where the error * originated. This will trace all nested exception * objects, as well as this object. * @param s The writer where the dump will be sent to. */ public void printStackTrace(java.io.PrintWriter s) { if (s == null) { s = new java.io.PrintWriter(System.err, true); } try { String locInfo = getLocationAsString(); if (null != locInfo) { s.println(locInfo); } super.printStackTrace(s); } catch (Throwable e) {} } }
/** * Print the the trace of methods from where the error * originated. This will trace all nested exception * objects, as well as this object. * @param s The writer where the dump will be sent to. */ public void printStackTrace(java.io.PrintWriter s) { if (s == null) { s = new java.io.PrintWriter(System.err, true); } try { String locInfo = getLocationAsString(); if (null != locInfo) { s.println(locInfo); } super.printStackTrace(s); } catch (Throwable e) {} } }
String locInfo = getLocationAsString(); String locInfo = ((TransformerException) exception) .getLocationAsString();
System.err.println(" " + exception.getMessage() + " in intermediate stylesheet" + exception.getLocationAsString()); } catch (Exception e) { logger.log(Level.SEVERE, "", e);
System.err.println(" " + exception.getMessage() + " in intermediate stylesheet" + exception.getLocationAsString()); } catch (Exception e) { logger.log(Level.SEVERE, "", e);
log.error("XSL error: {} at {}", e.toString(), e.getLocationAsString()); log.error(xslt); throw new RuntimeException(e);
if ( e.getLocationAsString( ) != null ) strMessage += ( " - location : " + e.getLocationAsString( ) );
if ( e.getLocationAsString( ) != null ) strMessage += ( "- location : " + e.getLocationAsString( ) );
@Nonnull private static IResourceError _buildError (@Nonnull final TransformerException ex, @Nonnull final EErrorLevel eErrorLevel, @Nonnull final IHasDisplayText aErrorMsg) { final SourceLocator aLocator = ex.getLocator (); final IResourceLocation aLocation = aLocator != null ? new ResourceLocation (StringHelper.getConcatenatedOnDemand (aLocator.getPublicId (), "/", aLocator.getSystemId ()), aLocator.getLineNumber (), aLocator.getColumnNumber ()) : new ResourceLocation (ex.getLocationAsString ()); return new ResourceError (aLocation, eErrorLevel, aErrorMsg, ex); }
StringBuilder msgs = new StringBuilder(); for (TransformerException te : errs.getErrors()) { msgs.append(te.getLocationAsString() + ": " + te.toString() + '\n');
((javax.xml.transform.TransformerException)t).getLocationAsString(), t);
private void printEx(Throwable e, Document doc, Node root) { if (e == null) { return; } Element error = doc.createElement("exception"); root.appendChild(error); error.setAttribute("type", e.getClass().getName()); insertErrInfo(error, "Message", e.getMessage()); if (e instanceof SAXParseException) { SAXParseException sex = (SAXParseException) e; insertErrInfo(error, "Id", sex.getSystemId()); insertErrInfo(error, "Line", "" + sex.getLineNumber()); insertErrInfo(error, "Column", "" + sex.getColumnNumber()); printEx(sex.getException(), doc, root); } else if (e instanceof TargetGenerationException) { TargetGenerationException tagex = (TargetGenerationException) e; insertErrInfo(error, "Key", tagex.getTargetkey()); printEx(tagex.getCause(), doc, root); } else if (e instanceof TransformerException) { TransformerException trex = (TransformerException) e; insertErrInfo(error, "Location", trex.getLocationAsString()); printEx(trex.getCause(), doc, root); } else if (e instanceof SAXException) { SAXException saxex = (SAXException) e; printEx(saxex.getException(), doc, root); } }
protected String formatError(String context, TransformerException e) { JBossStringBuilder buffer = new JBossStringBuilder(); buffer.append("File ").append(fileName); buffer.append(" process ").append(context); buffer.append(". Location: ").append(e.getLocationAsString()); buffer.append(". Error message: ").append(e.getMessage()); return buffer.toString(); }