public String getLocalizedMessage() { StringBuffer message = new StringBuffer(); message.append(errors.size() + " Error(s) occured ["); for (Iterator iterator = errors.iterator(); iterator.hasNext();) { Error error = (Error) iterator.next(); message.append('\"').append(error.getLocalizedMessage()).append('\"'); if (iterator.hasNext()) { message.append(", "); } } return message.append("]").toString(); }
@Override public String getLocalizedMessage() { rethrowThisMaybe(); return super.getLocalizedMessage(); }
final static void unexpectedError( final Error e ) { System.err.println(); e.printStackTrace( System.err ); System.err.println(); final StringBuffer sb = new StringBuffer(); for( final StackTraceElement s : e.getStackTrace() ) { sb.append( s + "\n" ); } JOptionPane .showMessageDialog( null, "An unexpected (possibly severe) error has occured - terminating. \nPlease contact: " + Constants.AUTHOR_EMAIL + " \nError: " + e.getLocalizedMessage() + "\n" + sb, "Unexpected Severe Error [" + Constants.PRG_NAME + " " + Constants.VERSION + "]", JOptionPane.ERROR_MESSAGE ); System.exit( -1 ); }
protected void dispatchEvent(final AWTEvent evt) { try { super.dispatchEvent(evt); } catch (final Exception e) { log.error(e.getLocalizedMessage(), e); showErrorDialog(e); } catch (final Error e) { log.error(e.getLocalizedMessage(), e); showErrorDialog(e); } } }
log.error(e.getLocalizedMessage(), e); } catch (Error e) { log.error(e.getLocalizedMessage(), e); log.error(e.getLocalizedMessage(), e); } catch (Error e) { log.error(e.getLocalizedMessage(), e); } finally {
@Override public String getLocalizedMessage() { if(!MockFramework.isEnabled()){ return super.getLocalizedMessage(); } return getDelegate().getLocalizedMessage(); }
pipe.setPositionable(this); } catch (Error e) { throw new ParseException(e.getLocalizedMessage()); } catch (XMLStreamException e) { throw new ParseException(e);
pipe.setPositionable(this); } catch (Error e) { throw new ParseException(e.getLocalizedMessage()); } catch (XMLStreamException e) { throw new ParseException(e);
pipe.setPositionable(this); } catch (Error e) { throw new ParseException(e.getLocalizedMessage()); } catch (XMLStreamException e) { throw new ParseException(e);
/** * Load the given class name with the given class loader. */ public static Class loadClass(String className, ClassLoader loader, boolean throwExceptionIfNotFound, MetadataProject project) { Class candidateClass = null; try { candidateClass = loader.loadClass(className); } catch (ClassNotFoundException exc){ if (throwExceptionIfNotFound){ throw PersistenceUnitLoadingException.exceptionLoadingClassWhileLookingForAnnotations(className, exc); } else { AbstractSessionLog.getLog().log(AbstractSessionLog.WARNING, "persistence_unit_processor_error_loading_class", exc.getClass().getName(), exc.getLocalizedMessage() , className); } } catch (NullPointerException npe) { // Bug 227630: If any weavable class is not found in the temporary // classLoader - disable weaving AbstractSessionLog.getLog().log(AbstractSessionLog.WARNING, AbstractSessionLog.WEAVER, "persistence_unit_processor_error_loading_class_weaving_disabled", loader, project.getPersistenceUnitInfo().getPersistenceUnitName(), className); // Disable weaving (for 1->1 and many->1)only if the classLoader // returns a NPE on loadClass() project.disableWeaving(); } catch (Exception exception){ AbstractSessionLog.getLog().log(AbstractSessionLog.WARNING, AbstractSessionLog.WEAVER, "persistence_unit_processor_error_loading_class", exception.getClass().getName(), exception.getLocalizedMessage() , className); } catch (Error error){ AbstractSessionLog.getLog().log(AbstractSessionLog.WARNING, AbstractSessionLog.WEAVER, "persistence_unit_processor_error_loading_class", error.getClass().getName(), error.getLocalizedMessage() , className); throw error; } return candidateClass; }
log_.log(LogLevel.SEVERE, err.getLocalizedMessage(), err );
throw new PhylogenyParserException( "severe error: " + err.getLocalizedMessage() );
System.exit(1); } catch (Error e) { log.error(e.getLocalizedMessage(), e); ExceptionUtils.showErrorDialog(e); System.exit(1);
throw new RuntimeException("Erreur grave lors du calcul\n" + er.getLocalizedMessage());
return false; } catch (Error ee) { errorHandler.showError(ee.getLocalizedMessage()); return false;