src/com/sun/xml/internal/stream/XMLEventReaderImpl.java
Print this page
*** 246,257 ****
Object object = null;
try{
object = nextEvent();
}catch(XMLStreamException streamException){
fLastEvent = null ;
! //xxx: what should be done in this case ?
! throw new NoSuchElementException();
}
return object;
}
public XMLEvent peek() throws XMLStreamException{
--- 246,259 ----
Object object = null;
try{
object = nextEvent();
}catch(XMLStreamException streamException){
fLastEvent = null ;
! //don't swallow the cause
! NoSuchElementException e = new NoSuchElementException(streamException.getMessage());
! e.initCause(streamException.getCause());
! throw e;
}
return object;
}
public XMLEvent peek() throws XMLStreamException{