Examples of ErrorListener


Examples of javax.xml.transform.ErrorListener

          throws org.xml.sax.SAXException
  {

    String formattedMsg = e.getMessage();
    SAXSourceLocator locator = getLocator();
    ErrorListener handler = m_stylesheetProcessor.getErrorListener();

    try
    {
      handler.error(new TransformerException(formattedMsg, locator));
    }
    catch (TransformerException te)
    {
      throw new org.xml.sax.SAXException(te);
    }
View Full Code Here

Examples of javax.xml.transform.ErrorListener

          throws org.xml.sax.SAXException
  {

    String formattedMsg = e.getMessage();
    SAXSourceLocator locator = getLocator();
    ErrorListener handler = m_stylesheetProcessor.getErrorListener();

    try
    {
      handler.fatalError(new TransformerException(formattedMsg, locator));
    }
    catch (TransformerException te)
    {
      throw new org.xml.sax.SAXException(te);
    }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.parser.kernel.completions.ErrorListener

   public ParserThread(SQLSchema schema)
  {
    super(PARSER_THREAD_NM);
      this._schema = schema;

    ErrorListener errListener = new ErrorListener()
    {
      public void errorDetected(String message, int line, int column)
      {
        onErrorDetected(message, line, column);
      }
View Full Code Here

Examples of org.antlr.works.utils.ErrorListener

            } else {
                needsToCreateGrammar = true;
            }
        }

        ErrorListener el = ErrorListener.getThreadInstance();
        ErrorManager.setErrorListener(el);

        parserGrammar = null;
        lexerGrammar = null;

        createGrammarResult.clear();

        try {
            switch(engine.getType()) {
                case ElementGrammarName.COMBINED:
                    createCombinedGrammar();
                    break;
                case ElementGrammarName.TREEPARSER:
                case ElementGrammarName.PARSER:
                    createParserGrammar();
                    break;
                case ElementGrammarName.LEXER:
                    createLexerGrammar();
                    break;
            }

            // if no exception, then assume create grammar was successful
            needsToCreateGrammar = false;
        } finally {
            // store the result of creating the grammars
            createGrammarResult.setErrors(el.errors);
            createGrammarResult.setWarnings(el.warnings);

            el.clear();
            ErrorManager.removeErrorListener();
        }
    }
View Full Code Here

Examples of org.antlr.works.utils.ErrorListener

                needsToAnalyzeGrammar = true;
            }
        }

        // Set the error listener
        ErrorListener el = ErrorListener.getThreadInstance();
        ErrorManager.setErrorListener(el);

        createGrammars();

        Grammar g = getDefaultGrammar();
View Full Code Here

Examples of org.antlr.works.utils.ErrorListener

    public String getLastError() {
        return lastError;
    }

    public boolean generate() {
        ErrorListener el = ErrorListener.getThreadInstance();
        ErrorManager.setErrorListener(el);

        String[] params;
        if(debug)
            params = new String[] { "-debug", "-o", getOutputPath(), "-lib", window.getFileFolder(), window.getFilePath() };
        else
            params = new String[] { "-o", getOutputPath(), "-lib", window.getFileFolder(), window.getFilePath() };

        new File(getOutputPath()).mkdirs();

        Tool antlr = new Tool(Utils.concat(params, AWPrefs.getANTLR3Options()));
        antlr.process();

        boolean success = !el.hasErrors();
        if(success) {
            dateOfModificationOnDisk = window.getDocument().getDateOfModificationOnDisk();
        }
        lastError = el.getFirstErrorMessage();
        el.clear();
        ErrorManager.removeErrorListener();
        return success;
    }
View Full Code Here

Examples of org.switchyard.ErrorListener

    }

    @Test
    public void testErrorListener() throws InterruptedException {
        final AtomicBoolean fired = new AtomicBoolean();
        ErrorListener listener = new ErrorListener() {
            @Override
            public void notify(Exchange ex, Throwable e) {
                fired.compareAndSet(false, true);
            }
        };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.