jaxp/src/com/sun/xml/internal/stream/XMLEventReaderImpl.java
changeset 13062 ee5778a552cb
parent 12457 c348e06f0e82
equal deleted inserted replaced
13061:7dfa5735cbc2 13062:ee5778a552cb
   246         Object object = null;
   246         Object object = null;
   247         try{
   247         try{
   248             object = nextEvent();
   248             object = nextEvent();
   249         }catch(XMLStreamException streamException){
   249         }catch(XMLStreamException streamException){
   250             fLastEvent = null ;
   250             fLastEvent = null ;
   251             //xxx: what should be done in this case ?
   251             //don't swallow the cause
   252             throw new NoSuchElementException();
   252             NoSuchElementException e = new NoSuchElementException(streamException.getMessage());
       
   253             e.initCause(streamException.getCause());
       
   254             throw e;
       
   255 
   253         }
   256         }
   254         return object;
   257         return object;
   255     }
   258     }
   256 
   259 
   257     public XMLEvent peek() throws XMLStreamException{
   260     public XMLEvent peek() throws XMLStreamException{