Package java.text

Examples of java.text.ParseException.initCause()


    LineNumberReader br = new LineNumberReader(in);
    try {
      addInternal(br);
    } catch (IllegalArgumentException e) {
      ParseException ex = new ParseException("Invalid synonym rule at line " + br.getLineNumber(), 0);
      ex.initCause(e);
      throw ex;
    } finally {
      br.close();
    }
  }
View Full Code Here


      // fromValid(), we implement this method in terms of that one rather
      // than the reverse.

      ParseException parseException =
          new ParseException("Invalid host specifier: " + specifier, 0);
      parseException.initCause(e);
      throw parseException;
    }
  }

  /**
 
View Full Code Here

        q.setMeasure(measure);
        try {
            q.init();
        } catch (Exception e) {
            ParseException e2 = new ParseException(query + ": " + e.getMessage(), 0);
            e2.initCause(e);
            throw e2;
        }
        return q;
    }
   
View Full Code Here

        if (namePathMapper != null) {
            try {
                nodeTypeName = namePathMapper.getOakName(nodeTypeName);
            } catch (RepositoryException e) {
                ParseException e2 = getSyntaxError("could not convert node type name " + nodeTypeName);
                e2.initCause(e);
                throw e2;
            }
        }
        NodeState type = types.getChildNode(nodeTypeName);
        if (!type.exists()) {
View Full Code Here

      // fromValid(), we implement this method in terms of that one rather
      // than the reverse.

      ParseException parseException =
          new ParseException("Invalid host specifier: " + specifier, 0);
      parseException.initCause(e);
      throw parseException;
    }
  }

  /**
 
View Full Code Here

            } else if(XMP_TIFF_NAMESPACE.equals(namespace)){
                setTiffProperty(key, value);
            }
        } catch (NumberFormatException nfx){
            ParseException px = new ParseException(nfx.getMessage(), 0);
            px.initCause(nfx);
            throw px;
        }
    }

    @Override
View Full Code Here

                }
            }
        }
        } catch (ArrayIndexOutOfBoundsException xx){
            ParseException pex = new ParseException("Error parsing date " + value, 0);
            pex.initCause(xx);
            throw pex;
        }
        return dateTime;
    }
View Full Code Here

        try {
            parser.parse();
        } catch (Exception e) {
            ParseException pe = new ParseException("failed to parse report: " + report + ": "
                    + e.getMessage(), 0);
            pe.initCause(e);
            throw pe;
        }
    }

    public Artifact[] getArtifacts() {
View Full Code Here

    }

    private ParseException newParserException(Exception e) {
        Message.error(e.getMessage());
        ParseException pe = new ParseException(e.getMessage() , 0);
        pe.initCause(e);
        return pe;
    }

}
View Full Code Here

                ise.initCause(ex);
                throw ise;
            } catch (Exception ex) {
                checkErrors();
                ParseException pe = new ParseException(ex.getMessage(), 0);
                pe.initCause(ex);
                throw pe;
            }
        }

        public void startElement(String uri, String localName, String qName, Attributes attributes)
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.