List of usage examples for java.lang Throwable fillInStackTrace
public synchronized Throwable fillInStackTrace()
From source file:uk.nhs.cfh.dsp.srth.desktop.modules.queryresultspanel.actions.ExecuteQueryTask.java
@Override protected void failed(Throwable e) { String simpleMessage = "Error running query."; setMessage(simpleMessage);/*from w w w. j a va 2 s. c om*/ applicationService.notifyError(simpleMessage, e, Level.WARNING); logger.warn(simpleMessage + " Nested exception is : " + e.fillInStackTrace().getMessage()); }
From source file:org.eclipse.vjet.dsf.common.trace.handler.TraceConsoleHandler.java
private void traceExitMethod(TraceEvent event) { final Throwable t = new Throwable(); t.fillInStackTrace(); Object caller = event.getSource(); final String clsName = TraceUtil.getClassName(caller); final String methodName = TraceUtil.getMethodName(caller, t); pop(clsName + DOT + methodName);/*w w w.ja v a2s.c o m*/ write(getPadding(m_traceDepth) + EXIT); // m_xmlWriter.handleExitMethod(m_traceDepth, clsName, methodName); // m_xmlWriter.writeEndElement(); }
From source file:org.eclipse.vjet.dsf.common.trace.handler.DefaultTraceEventHandler.java
private void traceExitMethod(TraceEvent event) { final Throwable t = new Throwable(); t.fillInStackTrace(); Object caller = event.getSource(); final String clsName = TraceUtil.getClassName(caller); final String methodName = TraceUtil.getMethodName(caller, t); pop(clsName + DOT + methodName);//from w w w .j ava2 s . c o m // m_xmlWriter.handleExitMethod(m_traceDepth, clsName, methodName); m_xmlWriter.writeEndElement(); }
From source file:org.eclipse.vjet.dsf.common.trace.handler.TraceConsoleHandler.java
private void traceEnterMethod(TraceEvent event) { final Throwable t = new Throwable(); t.fillInStackTrace(); Object caller = event.getSource(); final String clsName = TraceUtil.getClassName(caller); final String methodName = TraceUtil.getMethodName(caller, t); push(clsName + DOT + methodName);/* w w w. j ava 2 s . c o m*/ write(getPadding(m_traceDepth) + ENTER_COLON + clsName + DOT + methodName); // m_xmlWriter.handleEnterMethod(m_traceDepth, clsName, methodName); // m_xmlWriter.writeStartElement(clsName); // m_xmlWriter.writeAttribute(ATTR_METHOD, methodName); // Object[] args = event.getArgs(); // if (args == null || args.length == 0){ // return; // } // // for (Object obj: args){ // m_xmlWriter.writeAttribute("param", TraceUtil.getType(obj)); // } }
From source file:uk.nhs.cfh.dsp.srth.desktop.modules.queryresultspanel.actions.ExportResultTask.java
@Override protected void failed(Throwable e) { String simpleMessage = "Error exporting results. " + e.getMessage(); setMessage(simpleMessage);//from www .ja va 2s . c o m applicationService.notifyError(simpleMessage, e, Level.WARNING); logger.warn(simpleMessage + "Nested exception is : " + e.fillInStackTrace().getMessage()); }
From source file:net.jodah.failsafe.internal.actions.DoThrowAction.java
@Override public R execute(ActionContext<R> context) throws Exception { return super.execute(context, "", () -> { final Throwable t; synchronized (current) { if (current.isEmpty()) { throw FailsafeContinueException.INSTANCE; // move on to the next one }//from w w w.j a v a2s . co m t = current.remove(0); } ThrowableSupport.sneakyThrow(t.fillInStackTrace()); throw new InternalError("should not have been reached"); }); }
From source file:org.eclipse.vjet.dsf.common.trace.handler.DefaultTraceEventHandler.java
private void traceEnterMethod(TraceEvent event) { final Throwable t = new Throwable(); t.fillInStackTrace(); Object caller = event.getSource(); final String clsName = TraceUtil.getClassName(caller); final String methodName = TraceUtil.getMethodName(caller, t); push(clsName + DOT + methodName);//from www .j a v a 2s . co m // m_xmlWriter.handleEnterMethod(m_traceDepth, clsName, methodName); m_xmlWriter.writeStartElement(clsName); m_xmlWriter.writeAttribute(ATTR_METHOD, methodName); Object[] args = event.getArgs(); if (args == null || args.length == 0) { return; } for (Object obj : args) { m_xmlWriter.writeAttribute("param", TraceUtil.getType(obj)); } }
From source file:uk.nhs.cfh.dsp.srth.desktop.modules.simulator.viewcomponent.actions.DataGeneratorTask.java
@Override protected void failed(Throwable e) { String simpleMessage = "Error creating data. Nested message is " + e.getMessage(); setMessage(simpleMessage);/* www. j a v a 2 s . c o m*/ applicationService.notifyError(simpleMessage, e, Level.WARNING); logger.warn(simpleMessage + "Nested exception is : " + e.fillInStackTrace().getMessage()); setProgress(0); }
From source file:uk.nhs.cfh.dsp.srth.desktop.actions.querycrud.core.actions.SaveQueryToFileTask.java
/** * Failed./* w w w . jav a 2 s . c o m*/ * * @param e the e */ @Override protected void failed(Throwable e) { String simpleMessage = "Error saving query to file " + fileSelected + "Check file exists and is readable."; setMessage(simpleMessage); applicationService.notifyError(simpleMessage, e, Level.WARNING); logger.warn(simpleMessage + "Nested exception is : " + e.fillInStackTrace().getMessage()); }
From source file:uk.nhs.cfh.dsp.srth.desktop.uiframework.utils.GoogleFormErrorReporter.java
public void errorThrown(Object source, String errorMessage, Throwable cause, Level level) { // set LNF first to avoid component UI errors LookAndFeelUtils.setDefaultLNF();/*from ww w .ja v a 2 s.co m*/ errorPane.setErrorInfo(new ErrorInfo("Error", errorMessage, cause.fillInStackTrace().getMessage(), "", cause, level, new HashMap<String, String>(0))); errorDialog.setVisible(true); }