Package org.refcodes.exception
Class BugException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.refcodes.exception.AbstractRuntimeException
-
- org.refcodes.exception.BugException
-
- All Implemented Interfaces:
ErrorCodeAccessor
,Trap
public class BugException extends AbstractRuntimeException
Exception bugs (unchecked). A bug exception is thrown when it surely must be a bug when reaching the place when theBugException
is being thrown. Example: In case an enumeration is evaluated and an "unexpected" enumeration value is identified by the code (it does not know how to continue with that explicit enumeration value), then either the enumeration has been wrongly extended by new values or the code as not been extended to process that newly added enumeration. Her in a switch / case's "default" block you may throw aBugException
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.exception.ErrorCodeAccessor
ErrorCodeAccessor.ErrorCodeBuilder<B extends ErrorCodeAccessor.ErrorCodeBuilder<B>>, ErrorCodeAccessor.ErrorCodeMutator, ErrorCodeAccessor.ErrorCodeProperty
-
-
Constructor Summary
Constructors Constructor Description BugException(java.lang.String aMessage)
Instantiates a new bug exception.BugException(java.lang.String aMessage, java.lang.String aErrorCode)
Instantiates a new bug exception.BugException(java.lang.String message, java.lang.Throwable cause)
Instantiates a new bug exception.BugException(java.lang.String aMessage, java.lang.Throwable aCause, java.lang.String aErrorCode)
Instantiates a new bug exception.BugException(java.lang.Throwable cause)
Instantiates a new bug exception.BugException(java.lang.Throwable aCause, java.lang.String aErrorCode)
Instantiates a new bug exception.
-
Method Summary
-
Methods inherited from class org.refcodes.exception.AbstractRuntimeException
getErrorCode
-
-
-
-
Constructor Detail
-
BugException
public BugException(java.lang.String aMessage)
Instantiates a new bug exception.- Parameters:
aMessage
- the message
-
BugException
public BugException(java.lang.String message, java.lang.Throwable cause)
Instantiates a new bug exception.- Parameters:
message
- the messagecause
- the cause
-
BugException
public BugException(java.lang.Throwable cause)
Instantiates a new bug exception.- Parameters:
cause
- the cause
-
BugException
public BugException(java.lang.String aMessage, java.lang.String aErrorCode)
Instantiates a new bug exception.- Parameters:
aMessage
- the messageaErrorCode
- the error code
-
BugException
public BugException(java.lang.String aMessage, java.lang.Throwable aCause, java.lang.String aErrorCode)
Instantiates a new bug exception.- Parameters:
aMessage
- the messageaCause
- the causeaErrorCode
- the error code
-
BugException
public BugException(java.lang.Throwable aCause, java.lang.String aErrorCode)
Instantiates a new bug exception.- Parameters:
aCause
- the causeaErrorCode
- the error code
-
-