Package one.microstream.exceptions
Class BaseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
one.microstream.exceptions.BaseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ComException
,EntityException
,MemoryException
,MultiCauseException
,ParsingException
,PersistenceException
,StorageConfigurationException
,StorageException
,StorageRestAdapterException
,StorageRestServiceNotFoundException
,StorageViewException
public class BaseException extends RuntimeException
Base class for all exceptions that workarounds some design mistakes in JDK exceptions.
For example disposing of the impractical, dangerous and clean-code-preventing checked exceptions or a proper
distinction between assembling the output string and querying the custom message.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description BaseException()
BaseException(String message)
BaseException(String message, Throwable cause)
BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
BaseException(Throwable cause)
-
Method Summary
Modifier and Type Method Description String
assembleDetailString()
String
assembleOutputString()
String
getMessage()
Due to bad class design in the JDK'sThrowable
, this getter-named methods actually serves as the output string assembly method.
For the actual message getter, seemessage()
(which is a preferable name, anyway).
For the actually executed logic, seeassembleOutputString()
, which is called by this method.String
message()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BaseException
public BaseException() -
BaseException
-
BaseException
-
BaseException
-
BaseException
-
-
Method Details
-
message
-
assembleDetailString
-
assembleOutputString
-
getMessage
Due to bad class design in the JDK'sThrowable
, this getter-named methods actually serves as the output string assembly method.
For the actual message getter, seemessage()
(which is a preferable name, anyway).
For the actually executed logic, seeassembleOutputString()
, which is called by this method.- Overrides:
getMessage
in classThrowable
- Returns:
- this exception type's generic output string plus an explicit message if present.
-