public class ResourceManagerRuntimeException extends RuntimeException
ResourceManager.
Instances store references to the resource that threw the exception and the
exception that was thrown. Multiple exceptions caught by the ResourceManager
are linked together with the next field.
If the ResourceManager also caught any checked exceptions they
will be accessible with the getCheckedExceptions() method.
| Modifier and Type | Field and Description |
|---|---|
protected ResourceManagerCheckedException |
checked
A list of checked exceptions that were also thrown by a managed
resource.
|
protected RuntimeException |
ex
The exception that was thrown.
|
protected RuntimeException |
next
The next exception in the chain if more than one resource threw an
exception.
|
protected Closeable |
resource
The resource that threw the exception.
|
| Constructor and Description |
|---|
ResourceManagerRuntimeException(Closeable resource,
RuntimeException ex) |
ResourceManagerRuntimeException(Closeable resource,
RuntimeException ex,
RuntimeException next) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCheckedExceptions(ResourceManagerCheckedException e) |
ResourceManagerCheckedException |
getCheckedExceptions()
Returns any checked exceptions that were also caught by the
ResourceManager.
|
RuntimeException |
getException()
Returns the exception that was thrown.
|
RuntimeException |
getNextException()
Returns the next exception in the chain, or null if there is no
such exception.
|
Closeable |
getResource()
Returns the resource that threw the exception.
|
void |
printStackTrace()
Prints a stack trace to System.err.
|
void |
printStackTrace(PrintStream out) |
void |
printStackTrace(PrintWriter out) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toStringprotected Closeable resource
protected RuntimeException ex
protected RuntimeException next
protected ResourceManagerCheckedException checked
public ResourceManagerRuntimeException(Closeable resource, RuntimeException ex)
public ResourceManagerRuntimeException(Closeable resource, RuntimeException ex, RuntimeException next)
public void addCheckedExceptions(ResourceManagerCheckedException e)
public Closeable getResource()
public RuntimeException getException()
public RuntimeException getNextException()
public ResourceManagerCheckedException getCheckedExceptions()
public void printStackTrace()
printStackTrace in class Throwablepublic void printStackTrace(PrintStream out)
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter out)
printStackTrace in class ThrowableCopyright © 2016 The American National Corpus. All rights reserved.