Package java.text

Examples of java.text.ParseException.initCause()


        } catch (IOException e) {
            throw e;
        } catch (Exception e) {
            ParseException pe = new ParseException("failed to load settings from " + settingsUrl
                    + ": " + e.getMessage(), 0);
            pe.initCause(e);
            throw pe;
        } finally {
            if (stream != null) {
                try {
                    stream.close();
View Full Code Here


                    destFile, Collections.EMPTY_MAP, md.getStatus(),
                    md.getResolvedModuleRevisionId().getRevision(),
                    md.getResolvedPublicationDate(), ns, true, null);
        } catch (SAXException e) {
            ParseException ex = new ParseException("exception occured while parsing " + res, 0);
            ex.initCause(e);
            throw ex;
        } finally {
            if (is != null) {
                is.close();
            }
View Full Code Here

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

        private void parse(InputStream descriptor, Resource res, boolean validate)
View Full Code Here

            }
            return number.doubleValue();
        }
        catch (Exception e) {
            ParseException parseException = new ParseException("Error parsing double.", 0);
            parseException.initCause(e);
            throw parseException;
        }
        finally
        {
            releaseDecimalFormat(specifiedFormat,locale, pattern);
View Full Code Here

        source = CharSequences.trimWhitespaces(source);
        try {
            return valueOf(source);
        } catch (NumberFormatException cause) {
            ParseException e = new LocalizedParseException(null, type, source, null);
            e.initCause(cause);
            throw e;
        }
    }

    /**
 
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

            failure = e;
        }
        final int errorIndex = pos.getErrorIndex();
        final ParseException e = new ParseException(Errors.format(Errors.Keys.UnparsableStringForClass_3,
                elementType, source, CharSequences.token(source, errorIndex)), errorIndex);
        e.initCause(failure);
        throw e;
    }

    /**
     * Parses text from a string to produce a range. The method attempts to parse text starting
View Full Code Here

        try {
            return Integer.valueOf(text, this.radix);
        }
        catch (NumberFormatException nfe) {
            ParseException pe = new ParseException("illegal format", 0);
            pe.initCause(nfe);
            throw pe;
        }
    }

    @Override
View Full Code Here

                    destFile, Collections.EMPTY_MAP, md.getStatus(),
                    md.getResolvedModuleRevisionId().getRevision(),
                    md.getResolvedPublicationDate(), ns, true, null);
        } catch (SAXException e) {
            ParseException ex = new ParseException("exception occured while parsing " + res, 0);
            ex.initCause(e);
            throw ex;
        } finally {
            if (is != null) {
                is.close();
            }
View Full Code Here

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

        private void parse(InputStream descriptor, Resource res, boolean validate)
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.