Package com.sun.istack

Examples of com.sun.istack.SAXParseException2


    public final void error( Locator loc, String msg, Exception e ) {
        error( new SAXParseException2(msg,loc,e) );
    }

    public final void error( String msg, Exception e ) {
        error( new SAXParseException2(msg,null,e) );
    }
View Full Code Here


    private void reportError(Entity entity,
        String formattedMsg, Exception nestedException ) {
        Locator locator = (entity == null)?null:entity.getLocator();

        SAXParseException e = new SAXParseException2( formattedMsg,
            locator,
            nestedException );
        errReceiver.error(e);
    }
View Full Code Here

        // if the handler says "abort", we will not return the object
        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;

        if( !canRecover || !recover )
            throw new SAXParseException2( event.getMessage(), locator,
                new UnmarshalException(
                    event.getMessage(),
                    event.getLinkedException() ) );
    }
View Full Code Here

        // if the handler says "abort", we will not return the object
        // from the unmarshaller.getResult()
        if(!recover)    aborted = true;

        if( !canRecover || !recover )
            throw new SAXParseException2( event.getMessage(), locator,
                new UnmarshalException(
                    event.getMessage(),
                    event.getLinkedException() ) );
    }
View Full Code Here

            scanner.scan(element);
        } catch (SAXException e) {
            // since parsing DOM shouldn't cause a SAX exception
            // and our handler will never throw it, it's not clear
            // if this will ever happen.
            fatalError(new SAXParseException2(
                e.getMessage(), null, systemId,-1,-1, e));
        }
    }
View Full Code Here

    }

    private void reportError( Element errorSource,
                              String formattedMsg, Exception nestedException ) {

        SAXParseException e = new SAXParseException2( formattedMsg,
            forest.locatorTable.getStartLocation(errorSource),
            nestedException );
        errorReceiver.error(e);
    }
View Full Code Here

            String msg = e.getMessage();
            if (new File(relativeRef).exists()) {
                msg = Messages.format(Messages.ERR_FILENAME_IS_NOT_URI) + ' ' + msg;
            }

            SAXParseException spe = new SAXParseException2(
                    Messages.format(Messages.ERR_UNABLE_TO_PARSE, relativeRef, msg),
                    locator, e);

            fatalError(spe);
            throw spe;
        } catch (IOException e) {
            SAXParseException spe = new SAXParseException2(
                    Messages.format(Messages.ERR_UNABLE_TO_PARSE, relativeRef, e.getMessage()),
                    locator, e);

            fatalError(spe);
            throw spe;
View Full Code Here

    }
   
    private void reportError( Element errorSource,
        String formattedMsg, Exception nestedException ) {
       
        SAXParseException e = new SAXParseException2( formattedMsg,
            forest.locatorTable.getStartLocation(errorSource),
            nestedException );
        errorHandler.error(e);
    }
View Full Code Here

            reader.parse(is);
           
            if(controller.hadError())   throw new AbortException();
            return (Document)builder.getDOM();
        } catch( IOException e ) {
            receiver.error( new SAXParseException2(e.getMessage(),null,e) );
        } catch( SAXException e ) {
            receiver.error( new SAXParseException2(e.getMessage(),null,e) );
        } catch( ParserConfigurationException e ) {
            receiver.error( new SAXParseException2(e.getMessage(),null,e) );
        }
       
        throw new AbortException();
    }
View Full Code Here

    private void reportError(Entity entity,
        String formattedMsg, Exception nestedException ) {
        Locator locator = (entity == null)?null:entity.getLocator();

        SAXParseException e = new SAXParseException2( formattedMsg,
            locator,
            nestedException );
        errReceiver.error(e);
    }
View Full Code Here

TOP

Related Classes of com.sun.istack.SAXParseException2

Copyright © 2018 www.massapicom. 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.