public class NucleusException extends RuntimeException
Constructor and Description |
---|
NucleusException()
Constructs a new exception without a detail message.
|
NucleusException(String msg)
Constructs a new exception with the specified detail message.
|
NucleusException(String msg,
Object failed)
Constructs a new exception with the specified detail message and failed object.
|
NucleusException(String msg,
Throwable nested)
Constructs a new exception with the specified detail message and nested
Throwable . |
NucleusException(String msg,
Throwable[] nested)
Constructs a new exception with the specified detail message and nested
Throwable s. |
NucleusException(String msg,
Throwable[] nested,
Object failed)
Constructs a new exception with the specified detail
message, nested
Throwable s, and failed object. |
NucleusException(String msg,
Throwable nested,
Object failed)
Constructs a new exception with the specified detail message, nested
Throwable ,
and failed object. |
Modifier and Type | Method and Description |
---|---|
Throwable |
getCause()
Return the first nested exception (if any), otherwise null.
|
Object |
getFailedObject()
The exception may include a failed object.
|
Throwable[] |
getNestedExceptions()
The exception may have been caused by multiple exceptions in the runtime.
|
boolean |
isFatal()
Accessor for whether the exception is fatal, or retriable.
|
void |
printStackTrace()
Prints this
Exception and its backtrace to the standard
error output. |
void |
printStackTrace(PrintStream s)
Prints this
Exception and its backtrace to the specified print stream. |
void |
printStackTrace(PrintWriter s)
Prints this
Exception and its backtrace to the specified print writer. |
NucleusException |
setFatal()
Method to set the exception as being fatal.
|
void |
setNestedException(Throwable nested) |
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public NucleusException()
public NucleusException(String msg)
msg
- the detail message.public NucleusException(String msg, Throwable[] nested)
Throwable
s.msg
- the detail message.nested
- the nested Throwable[]
.public NucleusException(String msg, Throwable nested)
Throwable
.msg
- the detail message.nested
- the nested Throwable
.public NucleusException(String msg, Object failed)
msg
- the detail message.failed
- the failed object.public NucleusException(String msg, Throwable[] nested, Object failed)
Throwable
s, and failed object.msg
- the detail message.nested
- the nested Throwable[]
.failed
- the failed object.public NucleusException setFatal()
public boolean isFatal()
public Object getFailedObject()
public void setNestedException(Throwable nested)
public Throwable[] getNestedExceptions()
Exception
.public Throwable getCause()
public void printStackTrace()
Exception
and its backtrace to the standard
error output. Print nested Throwables' stack trace as well.printStackTrace
in class Throwable
public void printStackTrace(PrintStream s)
Exception
and its backtrace to the specified print stream. Print nested Throwables' stack trace as well.printStackTrace
in class Throwable
s
- PrintStream
to use for outputpublic void printStackTrace(PrintWriter s)
Exception
and its backtrace to the specified print writer. Print nested Throwables' stack trace as well.printStackTrace
in class Throwable
s
- PrintWriter
to use for outputCopyright © 2019. All rights reserved.