Examples of ParserException


Examples of org.codehaus.jparsec.error.ParserException

    return (T) ctxt.result;
  }
 
  private ParserException asParserException(Throwable e, ParseContext ctxt) {
    if (e instanceof ParserException) return (ParserException) e;
    return new ParserException(
        e, null, ctxt.module, ctxt.locator.locate(ctxt.getIndex()));
  }
View Full Code Here

Examples of org.cybergarage.xml.ParserException

      if (0 < rootList.getLength())
        root = parse(root, rootList.item(0));
*/
    }
    catch (Exception e) {
      throw new ParserException(e);
    }
   
    return root;
  }
View Full Code Here

Examples of org.dyno.visual.swing.plugin.spi.ParserException

            return result;
        }
      }
    } catch (JavaModelException jme) {
      ParserPlugin.getLogger().error(jme);
      throw new ParserException(jme);
    }
    return null;
  }
View Full Code Here

Examples of org.dyno.visual.swing.plugin.spi.ParserException

          parsePropertyValue(lnf, cunit, beanAdapter);
          beanAdapter.clearDirty();
          return beanAdapter;
        }
      } else {
        throw new ParserException("This is not a swing class!");
      }
    } catch (ParserException pe) {
      throw pe;
    } catch (Throwable e) {
      ParserPlugin.getLogger().error(e);
      throw new ParserException(e);
    }
    return null;
  }
View Full Code Here

Examples of org.erlide.runtime.api.ParserException

    public OtpErlangObject parseConsoleInput(final String string) throws ParserException {
        OtpErlangObject r1 = null;
        try {
            r1 = target.call("erlide_backend", "parse_string", "s", string);
        } catch (final Exception e) {
            throw new ParserException("Could not parse string \"" + string + "\": "
                    + e.getMessage());
        }
        final OtpErlangTuple t1 = (OtpErlangTuple) r1;
        if (Util.isOk(t1)) {
            return t1.elementAt(1);
        }
        throw new ParserException("Could not parse string \"" + string + "\": "
                + t1.elementAt(1).toString());
    }
View Full Code Here

Examples of org.htmlparser.util.ParserException

            oMtrs = oMatcher.getMatch();
            if (oMtrs!=nullsMatch = oMtrs.toString();
          }
        } // fi
        if (sMatch.length()==0)
          throw new ParserException("Match could not be retrieved for pattern " + sPattern);       
        int iDquote = sMatch.indexOf('"');
        int iSquote = sMatch.indexOf("'");
        char cQuote = (char) 0;
        if (iDquote>0 && iSquote>0)
          cQuote = iDquote<iSquote ? (char)34 : (char)39;
        else if (iDquote>0)
          cQuote = (char)34;
        else if (iSquote>0)
          cQuote = (char)39;
    if (cQuote==(char)0)
          oSrcSubs.setSubstitution(sMatch.substring(0,sAttributeName.length())+"="+sNewValue);
        else
          oSrcSubs.setSubstitution(sMatch.substring(0,sAttributeName.length())+"="+cQuote+sNewValue+cQuote);
      if (DebugFile.trace) DebugFile.writeln("Util.substitute("+sPattern+","+sMatch.substring(0,sAttributeName.length())+"="+cQuote+sNewValue+cQuote+")");
      return Util.substitute(oMatcher, oPattern, oSrcSubs, sBase);     
      } else {
        return sBase;
      } // fi (oMatcher.contains())
    } catch (MalformedPatternException mpe) {
      if (DebugFile.trace) {
        DebugFile.writeln("MalformedPatternException " + mpe.getMessage());
        try { DebugFile.writeln(StackTraceUtil.getStackTrace(mpe)); } catch (Exception ignore) { }
      }
      throw new ParserException("MalformedPatternException " + mpe.getMessage()+ " pattern " + sPattern + " substitution " + sNewValue, mpe);       
    }
    catch (ArrayIndexOutOfBoundsException aiob) {
      String sStack = "";
      try { sStack =  StackTraceUtil.getStackTrace(aiob); } catch (Exception ignore) { }
      if (DebugFile.trace) {
        DebugFile.writeln("ArrayIndexOutOfBoundsException " + aiob.getMessage());
        DebugFile.writeln(sStack);
      }
      int iAt = sStack.indexOf("at ");
      if (iAt>0) {
        int iLf = sStack.indexOf("\n",iAt);
        if (iLf>iAt)
          throw new ParserException("ArrayIndexOutOfBoundsException " + sStack.substring(iAt,iLf) + " " + aiob.getMessage()+ " attribute " + sAttributeName + " pattern " + sPattern + " match " + sMatch + " former value " + sFormerValue + " substitution " + sNewValue, aiob);
        else
          throw new ParserException("ArrayIndexOutOfBoundsException " + sStack.substring(iAt) + " " + aiob.getMessage()+ " attribute " + sAttributeName + " pattern " + sPattern + " match " + sMatch + " former value " + sFormerValue + " substitution " + sNewValue, aiob);         
      } else {
        throw new ParserException("ArrayIndexOutOfBoundsException " + aiob.getMessage()+ " attribute " + sAttributeName + " pattern " + sPattern + " match " + sMatch + " former value " + sFormerValue + " substitution " + sNewValue, aiob);
      }
    }
  } // doSubstitution
View Full Code Here

Examples of org.htmlparser.util.ParserException

            String msg;
            if (tag != null)
                msg = tag.getText();
            else
                msg = "null";
            throw new ParserException(
                "HTMLLinkScanner.extractLink() : Error while extracting link from tag "
                    + msg
                    + ", url = "
                    + url,
                e);
View Full Code Here

Examples of org.htmlparser.util.ParserException

        catch (IOException ioe)
        {
            String msg =
                "HTMLParser.openConnection() : Error in opening a connection to "
                    + url.toExternalForm();
            ParserException ex = new ParserException(msg, ioe);
            if (null != feedback)
                feedback.error(msg, ex);
            throw ex;
        }
View Full Code Here

Examples of org.htmlparser.util.ParserException

            catch (MalformedURLException murle2)
            {
                String msg =
                    "HTMLParser.openConnection() : Error in opening a connection to "
                        + string;
                ParserException ex = new ParserException(msg, murle2);
                if (null != feedback)
                    feedback.error(msg, ex);
                throw ex;
            }
            catch (IOException ioe)
            {
                String msg =
                    "HTMLParser.openConnection() : Error in opening a connection to "
                        + string;
                ParserException ex = new ParserException(msg, ioe);
                if (null != feedback)
                    feedback.error(msg, ex);
                throw ex;
            }
        }
View Full Code Here

Examples of org.htmlparser.util.ParserException

            String msg;
            if (tag != null)
                msg = tag.getText();
            else
                msg = "null";
            throw new ParserException(
                "HTMLFrameScanner.extractFrameLocn() : Error in extracting frame location from tag "
                    + msg,
                e);
        }
    }
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.