/** Annotates given exception with given values. All the * previous annotations are kept and this new is added at * the top of the annotation stack (index 0 of the annotation * array). * * @param t the exception * @param localizedMessage localized message for the user or null * @return the same exception <code>t</code> (as a convenience) */ public final Throwable annotate(Throwable t, String localizedMessage) { return annotate(t, UNKNOWN, null, localizedMessage, null, null); }
/** Annotates target exception with given exception. All the * previous annotations are kept and this new is added at * the top of the annotation stack (index 0 of the annotation * array). * <p>Consider using {@link Throwable#initCause} instead; this * will be correctly reported by the NetBeans error manager, and * also works properly with {@link Throwable#printStackTrace()}. * @param target the exception to be annotated * @param t the exception that will be added * @return the same exception <code>target</code> (as a convenience) */ public final Throwable annotate(Throwable target, Throwable t) { return annotate(target, UNKNOWN, null, null, t, null); }
return annotate(t, UNKNOWN, null, null, copyFrom, null);
em.annotate(t, severity, message, localizedMessage, stackTrace, date);
/** Annotates given exception with given values. All the * previous annotations are kept and this new is added at * the top of the annotation stack (index 0 of the annotation * array). * * @param t the exception * @param localizedMessage localized message for the user or null * @return the same exception <code>t</code> (as a convenience) */ public final Throwable annotate(Throwable t, String localizedMessage) { return annotate(t, UNKNOWN, null, localizedMessage, null, null); }
/** Annotates target exception with given exception. All the * previous annotations are kept and this new is added at * the top of the annotation stack (index 0 of the annotation * array). * <p>Consider using {@link Throwable#initCause} instead; this * will be correctly reported by the NetBeans error manager, and * also works properly with {@link Throwable#printStackTrace()}. * @param target the exception to be annotated * @param t the exception that will be added * @return the same exception <code>target</code> (as a convenience) */ public final Throwable annotate(Throwable target, Throwable t) { return annotate(target, UNKNOWN, null, null, t, null); }
return annotate(t, UNKNOWN, null, null, copyFrom, null);
em.annotate(t, severity, message, localizedMessage, stackTrace, date);
/** Calls all delegates. */ public Throwable annotate ( Throwable t, int severity, String message, String localizedMessage, Throwable stackTrace, java.util.Date date) { for (Iterator i = delegates.iterator(); i.hasNext(); ) { ErrorManager em = (ErrorManager)i.next(); em.annotate(t, severity, message, localizedMessage, stackTrace, date); } return t; }
static Throwable annotate(Throwable t, int severity, String message, String localizedMessage, Throwable stackTrace, java.util.Date date) { return ErrorManager.getDefault ().annotate(t, severity, message, localizedMessage, stackTrace, date); }
public void warning (Throwable ex, String annotation) { ErrorManager emgr = emgr(); if (annotation != null) emgr.annotate(ex, annotation); emgr.notify(ErrorManager.INFORMATIONAL, ex); //do not show until in debug mode }
static Throwable annotate(Throwable t, int severity, String message, String localizedMessage, Throwable stackTrace, java.util.Date date) { return ErrorManager.getDefault ().annotate(t, severity, message, localizedMessage, stackTrace, date); }
protected Class resolveClass(ObjectStreamClass v) throws IOException, ClassNotFoundException { ClassLoader cl = getNBClassLoader(); try { return Class.forName(v.getName(), false, cl); } catch (ClassNotFoundException cnfe) { String msg = "Offending classloader: " + cl; // NOI18N ErrorManager.getDefault ().annotate(cnfe, ErrorManager.INFORMATIONAL, msg, null, null, null); throw cnfe; } }
private static IntrospectionException mkie(Throwable t) { IntrospectionException ie = new IntrospectionException(t.toString()); ErrorManager.getDefault().annotate(ie, t); return ie; }
protected boolean badField(String tf, String err) { Exception ex = new IllegalArgumentException(); // OLD String fname = NbBundle.getMessage(BreakpointPanel.class, f); String msg = NbBundle.getMessage(BreakpointPanel.class, "ERR_invalid_field", // NOI18N err, tf); ErrorManager.getDefault().annotate(ex, msg); ErrorManager.getDefault().notify(ErrorManager.USER, ex); return false; }
protected boolean badField(String err) { Exception ex = new IllegalArgumentException(); ErrorManager.getDefault().annotate(ex, err); ErrorManager.getDefault().notify(ErrorManager.USER, ex); return false; }
public static void io ( String resource, Object arg1, Object arg2 ) throws IOException { FSException fsExc = new FSException (resource, new Object[] { arg1, arg2 }); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }
public static void io ( String resource, Object arg1, Object arg2, Object arg3, Object arg4 ) throws IOException { FSException fsExc = new FSException (resource, new Object[] { arg1, arg2, arg3, arg4 }); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }
public static void io ( String resource, Object arg1, Object arg2 ) throws IOException { FSException fsExc = new FSException (resource, new Object[] { arg1, arg2 }); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }
/** Creates the localized exception. * @param resource to take localization string from * @exception the exception */ public static void io (String resource) throws IOException { FSException fsExc = new FSException (resource, null); ErrorManager.getDefault().annotate (fsExc, ErrorManager.WARNING, null, fsExc.getLocalizedMessage(), null, null); throw fsExc; }