/** * Convenience method for handling generic exceptions. * * @param exception * @param errorMessage */ public static void handleException(final Bundle bundle, final Exception exception, final String errorMessage) { final MultiStatus errorStatus = getServiceInfo(bundle, exception); final IStatus status = new Status(IStatus.ERROR, bundle.getSymbolicName(), IStatus.ERROR, errorMessage, exception); errorStatus.add(status); Platform.getLog(bundle).log(status); }
/** * Convenience method for handling generic exceptions. * * @param exception * @param errorMessage */ public static void handleException(final Plugin plugin, final Throwable exception, final String errorMessage) { final MultiStatus errorStatus = getServiceInfo(plugin.getBundle(), exception); final IStatus status = new Status(IStatus.ERROR, plugin.getBundle().getSymbolicName(), IStatus.ERROR, errorMessage, exception); errorStatus.add(status); plugin.getLog().log(status); }
/** * 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); }