本文整理了Java中java.lang.Error.getLocalizedMessage()
方法的一些代码示例,展示了Error.getLocalizedMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Error.getLocalizedMessage()
方法的具体详情如下:
包路径:java.lang.Error
类名称:Error
方法名:getLocalizedMessage
暂无
代码示例来源:origin: org.apache.xbean/xbean-kernel
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();
}
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
@Override public String getLocalizedMessage() {
rethrowThisMaybe();
return super.getLocalizedMessage();
}
代码示例来源:origin: org.biojava.thirdparty/forester
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 );
}
代码示例来源:origin: Baralga/baralga
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);
}
}
}
代码示例来源:origin: Baralga/baralga
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 {
代码示例来源:origin: EvoSuite/evosuite
@Override
public String getLocalizedMessage() {
if(!MockFramework.isEnabled()){
return super.getLocalizedMessage();
}
return getDelegate().getLocalizedMessage();
}
代码示例来源:origin: org.apache.juneau/juneau-marshall
pipe.setPositionable(this);
} catch (Error e) {
throw new ParseException(e.getLocalizedMessage());
} catch (XMLStreamException e) {
throw new ParseException(e);
代码示例来源:origin: apache/juneau
pipe.setPositionable(this);
} catch (Error e) {
throw new ParseException(e.getLocalizedMessage());
} catch (XMLStreamException e) {
throw new ParseException(e);
代码示例来源:origin: apache/juneau
pipe.setPositionable(this);
} catch (Error e) {
throw new ParseException(e.getLocalizedMessage());
} catch (XMLStreamException e) {
throw new ParseException(e);
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* 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;
}
代码示例来源:origin: org.codehaus.openxma/xmabootrt
log_.log(LogLevel.SEVERE, err.getLocalizedMessage(), err );
代码示例来源:origin: org.biojava.thirdparty/forester
throw new PhylogenyParserException( "severe error: " + err.getLocalizedMessage() );
代码示例来源:origin: Baralga/baralga
System.exit(1);
} catch (Error e) {
log.error(e.getLocalizedMessage(), e);
ExceptionUtils.showErrorDialog(e);
System.exit(1);
代码示例来源:origin: org.fudaa.soft.fudaa-mascaret/mascaret-server
throw new RuntimeException("Erreur grave lors du calcul\n" + er.getLocalizedMessage());
代码示例来源:origin: geogebra/geogebra
return false;
} catch (Error ee) {
errorHandler.showError(ee.getLocalizedMessage());
return false;
内容来源于网络,如有侵权,请联系作者删除!