/** * Logs the given status. The status is distributed to the log listeners * installed on this log and then to the log listeners installed on the platform. * * @see Plugin#getLog() */ public void log(final IStatus status) { // Log to the logger logger.log(PlatformLogWriter.getLog(status), PlatformLogWriter.getLevel(status), status.getMessage(), status.getException()); }
private String getDetails(IStatus status) { if (status.getException() != null) { return getStackTrace(status.getException()); } return ""; //$NON-NLS-1$ }
/** * Returns the dummy log to use if none has been set */ private static ILogger getDummyLog() { return status -> { System.err.println(status.getMessage()); if (status.getException() != null) { status.getException().printStackTrace(System.err); } }; }
/** * Logs a CoreException */ private void log(CoreException e) { //create a new status to wrap the exception if there is no exception in the status IStatus status = e.getStatus(); if (status.getException() == null) status = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_WRITE_METADATA, "Internal error in history store", e); //$NON-NLS-1$ Policy.log(status); }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { status = undoableOperation.execute(monitor, null); if(status.getSeverity() == IStatus.ERROR){ throw new InvocationTargetException(status.getException()); } } catch (ExecutionException e) { throw new InvocationTargetException(e); } }
public static CoreException wrap(IStatus status) { CoreException e = new CoreException(status); Throwable t = status.getException(); if (t != null) e.initCause(t); return e; }
public static CoreException wrap(IStatus status) { CoreException e = new CoreException(status); Throwable t = status.getException(); if (t != null) e.initCause(t); return e; }
@Override public IStatus runInUIThread(IProgressMonitor monitor) { handleException(statusAdapter.getStatus().getException()); return new Status( IStatus.OK, IDEWorkbenchPlugin.IDE_WORKBENCH, IDEWorkbenchMessages.IDEExceptionHandler_ExceptionHandledMessage); }
public static void log(IStatus status) { FrameworkLog log = Activator.getFrameworkLog(); if (log != null) { log.log(getLog(status)); } else { System.out.println(status.getMessage()); if (status.getException() != null) status.getException().printStackTrace(); } }
static public void printChildren(IStatus status, PrintStream output) { IStatus[] children = status.getChildren(); if (children == null || children.length == 0) return; for (int i = 0; i < children.length; i++) { output.println("Contains: " + children[i].getMessage()); //$NON-NLS-1$ Throwable exception = children[i].getException(); if (exception != null) exception.printStackTrace(output); printChildren(children[i], output); } }
static public void printChildren(IStatus status, PrintStream output) { IStatus[] children = status.getChildren(); if (children == null || children.length == 0) return; for (int i = 0; i < children.length; i++) { output.println("Contains: " + children[i].getMessage()); //$NON-NLS-1$ Throwable exception = children[i].getException(); if (exception != null) exception.printStackTrace(output); printChildren(children[i], output); } }
static public void printChildren(IStatus status, PrintStream output) { IStatus[] children = status.getChildren(); if (children == null || children.length == 0) return; for (int i = 0; i < children.length; i++) { output.println("Contains: " + children[i].getMessage()); //$NON-NLS-1$ Throwable exception = children[i].getException(); if (exception != null) exception.printStackTrace(output); printChildren(children[i], output); } }
/** * Convenience method for handling generic exceptions. * * @param exception * @param errorMessage */ public static void handleErrorStatus(final Bundle bundle, final IStatus status) { final MultiStatus multiStatus = getServiceInfo(bundle, status.getException()); multiStatus.add(status); Platform.getLog(bundle).log(status); }
public void log(IStatus status) { if (this.context == null) return; final LogService logService = getLogService(); if (logService != null) { logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException()); } }
public void log(IStatus status) { LogService logService = getLogService(); if (logService != null) { logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException()); } }
public void log(IStatus status) { if (logService == null) logService = getLogService(); if (logService != null) logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException()); }
/** * Logs the given status. The status is distributed to the log listeners * installed on this log and then to the log listeners installed on the platform. * * @see Plugin#getLog() */ @Override public void log(final IStatus status) { // Log to the logger logger.log(PlatformLogWriter.getLog(status), PlatformLogWriter.getLevel(status), status.getMessage(), status.getException()); }
public void breakpointHasRuntimeException(final IJavaLineBreakpoint breakpoint, final DebugException exception) { IStatus status; Throwable wrappedException= exception.getStatus().getException(); if (wrappedException instanceof InvocationException) { InvocationException ie= (InvocationException) wrappedException; ObjectReference ref= ie.exception(); status= new Status(IStatus.ERROR,JDIDebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, ref.referenceType().name(), null); } else { status= exception.getStatus(); } openConditionErrorDialog(breakpoint, DebugUIMessages.JavaDebugOptionsManager_Conditional_breakpoint_encountered_runtime_exception__1, status); }
void logging(IStatus status) { Bundle b = getBundle(status); Logger equinoxLog = logService.getLogger(b, EQUINOX_LOGGER_NAME); equinoxLog.log(getLog(status), getLevel(status), status.getMessage(), status.getException()); }
void logging(IStatus status) { Bundle b = getBundle(status); Logger equinoxLog = logService.getLogger(b, EQUINOX_LOGGER_NAME); equinoxLog.log(getLog(status), getLevel(status), status.getMessage(), status.getException()); }