com.fasterxml.aalto
Class UncheckedStreamException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.fasterxml.aalto.UncheckedStreamException
All Implemented Interfaces:
java.io.Serializable

public class UncheckedStreamException
extends java.lang.RuntimeException

Unchecked exception that has to be used for methods of Stax API that do not allow throwing checked XMLStreamException, but where internal methods that need to be called may throw such an exception. It is, then, essentially used to overcome design flaws in Stax API.

This class generally tries to forward all requests to the underlying exception class, in the hopes that it can for the most part look just like if the underlying message was thrown. This may be confusing in some ways ("Why did my catch (XMLStreamException ..) clause catch this exception?"), but usually should make sense.

See Also:
Serialized Form

Method Summary
static UncheckedStreamException createFrom(javax.xml.stream.XMLStreamException sex)
           
 java.lang.String getLocalizedMessage()
           
 java.lang.String getMessage()
           
 java.lang.StackTraceElement[] getStackTrace()
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream p)
           
 void printStackTrace(java.io.PrintWriter p)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createFrom

public static UncheckedStreamException createFrom(javax.xml.stream.XMLStreamException sex)

getStackTrace

public java.lang.StackTraceElement[] getStackTrace()
Overrides:
getStackTrace in class java.lang.Throwable

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Overrides:
getLocalizedMessage in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream p)
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter p)
Overrides:
printStackTrace in class java.lang.Throwable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable