public String resolvePhysicalLocation(String baseLocation, String publicId, String logicalLocation) { // This class should never be called to perform physical resolution! // If it does we should log it as an error Logger.log(Logger.ERROR_DEBUG, "XMLCatalogIDResolver.resolvePhysicalLocation() called unexpectedly"); //$NON-NLS-1$ return logicalLocation; } }
public CMDocumentFactory getFactory() { if (factory == null) { try { factory = (CMDocumentFactory) fElement.createExecutableExtension("class"); //$NON-NLS-1$ } catch (Exception e) { Logger.logException("Exception loading CMDocumentFactory",e); //$NON-NLS-1$ } } return factory; } }
public static void log(int level, String message, Throwable exception) { _log(level, message, exception); }
Logger.logException(e1); Logger.log(Logger.ERROR, "IWAE0017E Unexpected IO exception occurred creating xml document");//$NON-NLS-1$
Logger.traceException(TRACE_PARSER_MANAGEMENT_EXCEPTION, ex); Logger.logException(ex); Logger.logException(ex); this.refresh = true; handleRefresh();
public static void trace(String category, String message) { _trace(category, message, null); }
if (!isDebugging()) return;
/** * Prints message to log if category matches /debug/tracefilter option. * * @param message * text to print * @param category * category of the message, to be compared with * /debug/tracefilter */ protected static void _trace(String category, String message, Throwable exception) { if (isTracing(category)) { message = (message != null) ? message : "null"; //$NON-NLS-1$ Status statusObj = new Status(IStatus.OK, PLUGIN_ID, IStatus.OK, message, exception); Bundle bundle = Platform.getBundle(PLUGIN_ID); if (bundle != null) Platform.getLog(bundle).log(statusObj); } }
public static void traceException(String category, String message, Throwable exception) { _trace(category, message, exception); }
/** * Determines if currently tracing a category * * @param category * @return true if tracing category, false otherwise */ public static boolean isTracing(String category) { if (!isDebugging()) return false; String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION); if (traceFilter != null) { StringTokenizer tokenizer = new StringTokenizer(traceFilter, ","); //$NON-NLS-1$ while (tokenizer.hasMoreTokens()) { String cat = tokenizer.nextToken().trim(); if (category.equals(cat)) { return true; } } } return false; }
protected IStatus run(IProgressMonitor monitor) { try { buildCMDocument(publicId, resolvedURI, type); } catch (Exception e) { Logger.logException(e); } return Status.OK_STATUS; } };
/** * Reports an error that occured while scanning - from the SED JFlex skeleton * * @param errorCode the code of the errormessage to display */ private void yy_ScanError(int errorCode) { try { Logger.log(Logger.ERROR, YY_ERROR_MSG[errorCode]); } catch (ArrayIndexOutOfBoundsException e) { Logger.log(Logger.ERROR, YY_ERROR_MSG[YY_UNKNOWN_ERROR]); } // DO NOT EXIT the VM on an error // System.exit(1); }
public static void logException(String message, Throwable exception) { _log(ERROR, message, exception); }
public static void traceException(String category, Throwable exception) { _trace(category, exception.getMessage(), exception); } }
public static void read(Catalog xmlCatalog, InputStream input) throws IOException { try { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); SAXParser parser = factory.newSAXParser(); parser.parse(new InputSource(input), new CatalogContentHandler(xmlCatalog)); } catch (ParserConfigurationException e) { Logger.logException(e); } catch (SAXException e) { Logger.logException(e); } } protected static class CatalogContentHandler extends DefaultHandler
/** * Reports an error that occured while scanning. * * In a wellformed scanner (no or only correct usage of * yypushback(int) and a match-all fallback rule) this method * will only be called with things that "Can't Possibly Happen". * If this method is called, something is seriously wrong * (e.g. a JFlex bug producing a faulty scanner etc.). * * Usual syntax/scanner level error handling should be done * in error fallback rules. * * @param errorCode the code of the errormessage to display */ private void zzScanError(int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } Logger.log(Logger.ERROR, message); try { throw new Error(message); } catch(Error e) { // BC } }
public static void log(int level, String message) { _log(level, message, null); }
public TwigScriptRegion(String newContext, int startOffset, IProject project, AbstractTwigLexer twigLexer, String lexerState) { super(newContext, startOffset, 0, 0, TwigScriptRegion.TWIG_SCRIPT); this.project = project; try { // we use reflection here since we don't know the constant value of // of this state in specific PHP version lexer // ST_PHP_LINE_COMMENT = twigLexer.getClass() // .getField("ST_PHP_LINE_COMMENT").getInt(twigLexer); ST_TWIG_CONTENT = twigLexer.getClass().getField(lexerState).getInt(twigLexer); } catch (Exception e) { Logger.logException(e); } completeReparse(twigLexer); }
protected void fireNodeParsed(IStructuredDocumentRegion fCurrentNode) { // never let an Exceptions from foreign code interfere with completion // of parsing. To get an exception here is definitely a program error // somewhere, // we can't afford to interrupt the flow of control. or backwards // typing can result! // // try { if (fCurrentNode != null && fStructuredDocumentRegionHandlers != null) { for (int i = 0; i < fStructuredDocumentRegionHandlers.size(); i++) ((StructuredDocumentRegionHandler) fStructuredDocumentRegionHandlers.get(i)).nodeParsed(fCurrentNode); } } catch (Exception e) { Logger.log(Logger.ERROR, e.getMessage()); } }
public static void logException(Throwable exception) { _log(ERROR, exception.getMessage(), exception); }