Refine search
/** Notifies the exception. Helper method. */ private static void exception (Exception e) { ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, e); } private static void exception(Exception e, FileObject fo) {
/** Annotates a Throwable if ErrorManager.INFORMATIONAL is loggable */ public static void annotateLoggable(Throwable t){ if (isLoggable){ ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, t); } }
/** Annotate & notify the error. */ private static void notifyException(Throwable err) { ErrorManager emgr = ErrorManager.getDefault(); emgr.notify(emgr.INFORMATIONAL, err); }
/** Notifies an exception. */ public static void exception (Exception ex) { ErrorManager.getDefault().notify (ErrorManager.INFORMATIONAL, ex); }
/** Notifies an exception to error manager or prints its it to stderr. * @param ex exception to notify */ static void notify(int severity, Throwable ex) { Throwable d = doNotNotify; doNotNotify = null; if (d == ex) return; ErrorManager.getDefault ().notify(severity, ex); } /**
public BeanInfo[] getAdditionalBeanInfo() { try { return new BeanInfo[] { Introspector.getBeanInfo(MultiFileLoader.class) }; } catch (IntrospectionException ie) { ErrorManager.getDefault().notify(ie); return null; } }
public void run () { try { builder.append(doc.getText(0, doc.getLength())); } catch (BadLocationException e) { ErrorManager.getDefault().notify(e); } } });
protected boolean badField(String err) { Exception ex = new IllegalArgumentException(); ErrorManager.getDefault().annotate(ex, err); ErrorManager.getDefault().notify(ErrorManager.USER, ex); return false; }
public void run () { try { int len = doc.getLength(); result[0] = new char[len+1]; doc.getText(0,len).getChars(0,len,result[0],0); length[0] = len; } catch (BadLocationException e) { ErrorManager.getDefault().notify(e); } } });
private static void indent (Document doc, int offset, int i) { StringBuilder sb = new StringBuilder (); while (i > 0) { sb.append (' ');i--; } try { doc.insertString (offset, sb.toString (), null); } catch (BadLocationException ex) { ErrorManager.getDefault ().notify (ex); } }
private static String[] getClassURLs(String className) { SourcePathProvider spp = SourcePath.getDefaultContext(); // TODO: spp.getAllURLs(className, true); try { return (String[]) spp.getClass().getMethod("getAllURLs", new Class[] { String.class, Boolean.TYPE }). invoke(spp, new Object[] { className, Boolean.TRUE }); } catch (Exception ex) { ErrorManager.getDefault().notify(ex); return new String[0]; } }
public void removeDescription() { try { removeDescriptionForLocale(null); } catch (VersionNotSupportedException ex){ ErrorManager.getDefault().notify(ex); } } public void removeAllDescriptions() {
public TokenHierarchy<?> getTokenHierarchy() { if (this.jfo == null) { throw new IllegalStateException (); } try { return this.jfo.getTokenHierarchy(); } catch (IOException ioe) { //Should never happen ErrorManager.getDefault().notify(ioe); return null; } }
public void run() { try { if (length > 0) { document.remove(offset, length); } document.insertString(offset, text, null); } catch (BadLocationException ble) { ErrorManager.getDefault().notify(ble); } } };
public ModuleConfiguration create(J2eeModule module) { ModuleConfiguration retVal = null; try { retVal = new ModuleConfigurationImpl(module); } catch (ConfigurationException ce) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ce); } return retVal; }
public Wizard getWizardInfo(){ try{ InputStream in = Wizard.class.getClassLoader().getResourceAsStream(DATAFILE); this.wizardInfo = Wizard.createGraph(in); }catch(Exception ex){ ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } return this.wizardInfo; }
public Wizard getWizardInfo(String filePath){ Wizard wizInfo = null; try{ InputStream in = Wizard.class.getClassLoader().getResourceAsStream(filePath); wizInfo = Wizard.createGraph(in); }catch(Exception ex){ ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } return wizInfo; }
protected void setValue(String value) { try { sunWebApp.setErrorUrl(value); } catch(VersionNotSupportedException ex) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); } } }
private void doDestroy(final Node[] sel) { for (int i=0; i< sel.length; i++) { try { sel[i].destroy(); } catch (IOException e) { ErrorManager.getDefault().notify(e); } } }
/** Creates a new instance of NewClass */ public AbstractSchemaBasedGrammar(GrammarEnvironment env) { try { SAXBuilder builder = new SAXBuilder(); InputStream stream = getSchemaStream(); schemaDoc = builder.build(stream); } catch (Exception exc) { ErrorManager.getDefault().notify(exc); } environment = env; }