Example usage for javax.xml.stream XMLStreamException getCause

List of usage examples for javax.xml.stream XMLStreamException getCause

Introduction

In this page you can find the example usage for javax.xml.stream XMLStreamException getCause.

Prototype

public synchronized Throwable getCause() 

Source Link

Document

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Usage

From source file:org.osaf.cosmo.eim.eimml.EimmlStreamReader.java

/**
 * Returns the next recordset in the stream. Returns null
 * if there are no more recordsets in the stream.
 *///from w  ww .  j a  v  a2s  .  co m
public EimRecordSet nextRecordSet() throws EimmlStreamException {
    try {
        return readNextRecordSet();
    } catch (XMLStreamException e) {
        close();
        throw new EimmlStreamException("Error reading next recordset", e);
    } catch (RuntimeException e) {
        close();
        Throwable t = e.getCause();
        if (t != null && t instanceof XMLStreamException)
            throw new EimmlStreamException("Error reading next recordset", t);

        throw e;
    }
}