本文整理了Java中java.util.logging.Handler.getErrorManager()
方法的一些代码示例,展示了Handler.getErrorManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Handler.getErrorManager()
方法的具体详情如下:
包路径:java.util.logging.Handler
类名称:Handler
方法名:getErrorManager
[英]Gets the error manager used by this handler to report errors during logging.
[中]获取此处理程序用于在日志记录期间报告错误的错误管理器。
代码示例来源:origin: geoserver/geoserver
/**
* Construct a handler.
*
* @param handler The handler to copy properties from.
* @param formatter The formatter to use.
* @throws UnsupportedEncodingException if the encoding is not valid.
*/
public Stdout(final Handler handler, final Formatter formatter)
throws UnsupportedEncodingException {
super(System.out, formatter);
setErrorManager(handler.getErrorManager());
setFilter(handler.getFilter());
setLevel(handler.getLevel());
setEncoding(handler.getEncoding());
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Used to get or create the default ErrorManager used before init.
* @return the super error manager or a new ErrorManager.
* @since JavaMail 1.5.3
*/
private ErrorManager defaultErrorManager() {
ErrorManager em;
try { //Try to share the super error manager.
em = super.getErrorManager();
} catch (RuntimeException | LinkageError ignore) {
em = null;
}
//Don't assume that the super call is not null.
if (em == null) {
em = new ErrorManager();
}
return em;
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Used to get or create the default ErrorManager used before init.
* @return the super error manager or a new ErrorManager.
* @since JavaMail 1.5.3
*/
private ErrorManager defaultErrorManager() {
ErrorManager em;
try { //Try to share the super error manager.
em = super.getErrorManager();
} catch (final RuntimeException ignore) {
em = null;
} catch (final LinkageError ignore) {
em = null;
}
//Don't assume that the super call is not null.
if (em == null) {
em = new ErrorManager();
}
return em;
}
代码示例来源:origin: com.projectdarkstar.server/sgs-server
/**
* {@inheritDoc}
*/
public ErrorManager getErrorManager() {
return handler.getErrorManager();
}
代码示例来源:origin: org.reddwarfserver.server/sgs-server
/**
* {@inheritDoc}
*/
public ErrorManager getErrorManager() {
return handler.getErrorManager();
}
代码示例来源:origin: dworkin/reddwarf
/**
* {@inheritDoc}
*/
public ErrorManager getErrorManager() {
return handler.getErrorManager();
}
代码示例来源:origin: com.mycila/mycila-log
public ErrorManager getErrorManager(T handler) {
return handler.getErrorManager();
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
@Override public ErrorManager
getErrorManager() { return this.delegate != null ? this.delegate.getErrorManager() : null; }
代码示例来源:origin: com.projectdarkstar.server/sgs-server
/**
* {@inheritDoc}
*/
public void reportError(String msg, Exception ex, int code) {
// NOTE: we can't call report error on the handler directly
// because it has protected access, so we emulate the code in
// Hander.java directly here, including the catch block
try {
handler.getErrorManager().error(msg, ex, code);
} catch (Exception ex2) {
System.err.println("TransactionalHandler.reportError() caught:");
ex2.printStackTrace();
}
}
代码示例来源:origin: org.reddwarfserver.server/sgs-server
/**
* {@inheritDoc}
*/
public void reportError(String msg, Exception ex, int code) {
// NOTE: we can't call report error on the handler directly
// because it has protected access, so we emulate the code in
// Hander.java directly here, including the catch block
try {
handler.getErrorManager().error(msg, ex, code);
} catch (Exception ex2) {
System.err.println("TransactionalHandler.reportError() caught:");
ex2.printStackTrace();
}
}
代码示例来源:origin: dworkin/reddwarf
/**
* {@inheritDoc}
*/
public void reportError(String msg, Exception ex, int code) {
// NOTE: we can't call report error on the handler directly
// because it has protected access, so we emulate the code in
// Hander.java directly here, including the catch block
try {
handler.getErrorManager().error(msg, ex, code);
} catch (Exception ex2) {
System.err.println("TransactionalHandler.reportError() caught:");
ex2.printStackTrace();
}
}
代码示例来源:origin: de.unkrig.commons/commons-util
@Nullable @Override public ErrorManager
getErrorManager() { return this.delegate != null ? this.delegate.getErrorManager() : null; }
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Used to get or create the default ErrorManager used before init.
* @return the super error manager or a new ErrorManager.
* @since JavaMail 1.5.3
*/
private ErrorManager defaultErrorManager() {
ErrorManager em;
try { //Try to share the super error manager.
em = super.getErrorManager();
} catch (RuntimeException | LinkageError ignore) {
em = null;
}
//Don't assume that the super call is not null.
if (em == null) {
em = new ErrorManager();
}
return em;
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Used to get or create the default ErrorManager used before init.
* @return the super error manager or a new ErrorManager.
* @since JavaMail 1.5.3
*/
private ErrorManager defaultErrorManager() {
ErrorManager em;
try { //Try to share the super error manager.
em = super.getErrorManager();
} catch (RuntimeException | LinkageError ignore) {
em = null;
}
//Don't assume that the super call is not null.
if (em == null) {
em = new ErrorManager();
}
return em;
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Used to get or create the default ErrorManager used before init.
* @return the super error manager or a new ErrorManager.
* @since JavaMail 1.5.3
*/
private ErrorManager defaultErrorManager() {
ErrorManager em;
try { //Try to share the super error manager.
em = super.getErrorManager();
} catch (RuntimeException | LinkageError ignore) {
em = null;
}
//Don't assume that the super call is not null.
if (em == null) {
em = new ErrorManager();
}
return em;
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Used to get or create the default ErrorManager used before init.
* @return the super error manager or a new ErrorManager.
* @since JavaMail 1.5.3
*/
private ErrorManager defaultErrorManager() {
ErrorManager em;
try { //Try to share the super error manager.
em = super.getErrorManager();
} catch (RuntimeException | LinkageError ignore) {
em = null;
}
//Don't assume that the super call is not null.
if (em == null) {
em = new ErrorManager();
}
return em;
}
代码示例来源:origin: stackoverflow.com
return (Number) f.get(out);
} catch (ReflectiveOperationException roe) {
h.getErrorManager().error(null, roe, ErrorManager.FORMAT_FAILURE);
代码示例来源:origin: stackoverflow.com
h.setFilter(null);
h.setFormatter(getFormatter());
h.setErrorManager(getErrorManager());
h.publish(r);
} finally {
代码示例来源:origin: stackoverflow.com
h.setFilter(getFilter());
h.setFormatter(getFormatter());
h.setErrorManager(getErrorManager());
h.publish(r);
} finally {
代码示例来源:origin: org.geotools/gt2-metadata
/**
* Constructs a handler.
*
* @param handler The handler to copy properties from.
* @param formatter The formatter to use.
*/
public Stdout(final Handler handler, final Formatter formatter)
throws UnsupportedEncodingException
{
super(System.out, formatter);
setErrorManager(handler.getErrorManager());
setFilter (handler.getFilter ());
setLevel (handler.getLevel ());
setEncoding (handler.getEncoding ());
}
内容来源于网络,如有侵权,请联系作者删除!