本文整理了Java中java.lang.LinkageError.printStackTrace()
方法的一些代码示例,展示了LinkageError.printStackTrace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LinkageError.printStackTrace()
方法的具体详情如下:
包路径:java.lang.LinkageError
类名称:LinkageError
方法名:printStackTrace
暂无
代码示例来源:origin: org.netbeans.api/org-openide-util
/** Calls all delegates. */
public void notify(int severity, Throwable t) {
if (delegates.isEmpty()) {
if (enterLogger()) return;
try {
AnnException ext = AnnException.extras.get(t);
if (ext != null) {
t = ext;
}
logger().log(convertSeverity(severity, true, OwnLevel.UNKNOWN), t.getMessage(), t);
} finally {
exitLogger();
}
return;
}
try {
for (ErrorManager em : delegates) {
em.notify(severity, t);
}
} catch (RuntimeException e) {
// #20467
e.printStackTrace();
t.printStackTrace();
} catch (LinkageError e) {
// #20467
e.printStackTrace();
t.printStackTrace();
}
}
代码示例来源:origin: org.netbeans.api/org-openide-util
private static DelegatingErrorManager getDefaultDelegate() {
DelegatingErrorManager c = new DelegatingErrorManager(""); // NOI18N
try {
c.initialize();
synchronized (ErrorManager.class) {
if (current == null) {
current = c;
// r is not null after c.initialize();
current.r.addLookupListener(current);
}
}
} catch (RuntimeException e) {
// #20467
e.printStackTrace();
current = c;
} catch (LinkageError e) {
// #20467
e.printStackTrace();
current = c;
}
return current;
}
代码示例来源:origin: pentaho/mondrian
} catch (LinkageError ignored) {
ignored.printStackTrace();
代码示例来源:origin: org.netbeans.api/org-openide-util-ui
/** Calls all delegates. */
public void notify(int severity, Throwable t) {
if (delegates.isEmpty()) {
if (enterLogger()) return;
try {
AnnException ext = AnnException.extras.get(t);
if (ext != null) {
t = ext;
}
logger().log(convertSeverity(severity, true, OwnLevel.UNKNOWN), t.getMessage(), t);
} finally {
exitLogger();
}
return;
}
try {
for (ErrorManager em : delegates) {
em.notify(severity, t);
}
} catch (RuntimeException e) {
// #20467
e.printStackTrace();
t.printStackTrace();
} catch (LinkageError e) {
// #20467
e.printStackTrace();
t.printStackTrace();
}
}
代码示例来源:origin: org.netbeans.api/org-openide-util-ui
private static DelegatingErrorManager getDefaultDelegate() {
DelegatingErrorManager c = new DelegatingErrorManager(""); // NOI18N
try {
c.initialize();
synchronized (ErrorManager.class) {
if (current == null) {
current = c;
// r is not null after c.initialize();
current.r.addLookupListener(current);
}
}
} catch (RuntimeException e) {
// #20467
e.printStackTrace();
current = c;
} catch (LinkageError e) {
// #20467
e.printStackTrace();
current = c;
}
return current;
}
代码示例来源:origin: org.dspace.dependencies.jmockit/dspace-jmockit
public static <T> Class<T> loadClass(String className)
{
try {
return (Class<T>) Class.forName(className);
}
catch (LinkageError e) {
e.printStackTrace();
throw e;
}
catch (ClassNotFoundException ignore) {
//noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException
throw new IllegalArgumentException("No class with name \"" + className + "\" found");
}
}
代码示例来源:origin: com.github.albfernandez.richfaces/richfaces-core
public java.lang.Class<?> apply(String from) {
try {
return Class.forName(from, true, Thread.currentThread().getContextClassLoader());
} catch (ClassNotFoundException e) {
// TODO: handle exception
e.printStackTrace();
} catch (LinkageError e) {
// TODO: handle exception
e.printStackTrace();
}
return null;
}
代码示例来源:origin: jmockit/jmockit1
@Nonnull
public static <T> Class<T> loadClass(@Nonnull String className) {
@Nullable Class<?> loadedClass = LOADED_CLASSES.get(className);
if (loadedClass == null) {
try {
loadedClass = loadClassFromAClassLoader(className);
}
catch (LinkageError e) {
e.printStackTrace();
throw e;
}
}
//noinspection unchecked
return (Class<T>) loadedClass;
}
代码示例来源:origin: org.eclipse/osgi
static void safeLogged(LogListener listener, LogEntry logEntry) {
try {
listener.logged(logEntry);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.osgi
static void safeLogged(LogListener listener, LogEntry logEntry) {
try {
listener.logged(logEntry);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi
static void safeLogged(LogListener listener, LogEntry logEntry) {
try {
listener.logged(logEntry);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
}
代码示例来源:origin: com.github.veithen.cosmos/cosmos-equinox
static void safeLogged(LogListener listener, LogEntry logEntry) {
try {
listener.logged(logEntry);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
static void safeLogged(LogListener listener, LogEntry logEntry) {
try {
listener.logged(logEntry);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi
static boolean safeIsLoggable(LogFilter filter, Bundle bundle, String name, int level) {
try {
return filter.isLoggable(bundle, name, level);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
return false;
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
static void safeLogged(LogListener listener, LogEntry logEntry) {
try {
listener.logged(logEntry);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.osgi
static boolean safeIsLoggable(LogFilter filter, Bundle bundle, String name, int level) {
try {
return filter.isLoggable(bundle, name, level);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
return false;
}
代码示例来源:origin: org.eclipse/osgi
static boolean safeIsLoggable(LogFilter filter, Bundle bundle, String name, int level) {
try {
return filter.isLoggable(bundle, name, level);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
return false;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.osgi
static boolean safeIsLoggable(LogFilter filter, Bundle bundle, String name, int level) {
try {
return filter.isLoggable(bundle, name, level);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
return false;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi
static void safeLogged(LogListener listener, LogEntry logEntry) {
try {
listener.logged(logEntry);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi
static boolean safeIsLoggable(LogFilter filter, Bundle bundle, String name, int level) {
try {
return filter.isLoggable(bundle, name, level);
} catch (RuntimeException e) {
// "listener.logged" calls user code and might throw an unchecked exception
// we catch the error here to gather information on where the problem occurred.
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
} catch (LinkageError e) {
// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
getErrorStream().println("LogFilter.isLoggable threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$
e.printStackTrace(getErrorStream());
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!