Package org.scictrl.mp.orbitcorrect
Class DataBushPackedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.scictrl.mp.orbitcorrect.DataBushException
org.scictrl.mp.orbitcorrect.DataBushPackedException
- All Implemented Interfaces:
Serializable
DatabushPackedException is used to pack together in one exception
object more than one exception when complex method is called.
This allows to pack together several problems and throw them at appropriate moment.
- Author:
- igor@scictrl.com
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionArray with exception packed into this one.Fields inherited from class org.scictrl.mp.orbitcorrect.DataBushException
code, source
-
Constructor Summary
ConstructorDescriptionCreate empty exception, will not be thrown.DataBushPackedException
(String message, int code) PackedDBException
constructor with specified parameters.Created packed exception with provided exception as initial element.DataBushPackedException
(AbstractDataBushElement source, String s, int code) PackedDBException
constructor with specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionint
count()
count.protected String
Returns the fully-qualified name of the entity represented by thisDataBushException
object, as aString
.int
maxCode()
maxCode.int
pack
(DataBushException dbe) PAcks an exception into this one.void
throwIt()
IfDBExceptionHolder
has an exception, this method throw it, otherwise do nothing.toString()
This method create string that describe this class object.Methods inherited from class org.scictrl.mp.orbitcorrect.DataBushException
formatMessage, getCode, getSource
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
packed
Array with exception packed into this one.
-
-
Constructor Details
-
DataBushPackedException
public DataBushPackedException()Create empty exception, will not be thrown. -
DataBushPackedException
PackedDBException
constructor with specified parameters.- Parameters:
message
- the messagecode
- the error code
-
DataBushPackedException
PackedDBException
constructor with specified parameters.- Parameters:
source
- AbstractDataBushElements
- java.lang.Stringcode
- int
-
DataBushPackedException
Created packed exception with provided exception as initial element.- Parameters:
dbe
- initial exception to be packed
-
-
Method Details
-
getClassName
Returns the fully-qualified name of the entity represented by thisDataBushException
object, as aString
. Returns the fully-qualified name of the entity represented by thisDataBushException
object, as aString
.- Overrides:
getClassName
in classDataBushException
- Returns:
- java.lang.String
-
pack
PAcks an exception into this one.- Parameters:
dbe
- to be packed- Returns:
- a int
-
count
public int count()count.
- Returns:
- a int
-
toString
This method create string that describe this class object. This string is different, than string, returned byformatMessage
output. Actually it is extended with name, returned bygetClassName
. This method return string that describe this class object.- Overrides:
toString
in classDataBushException
- See Also:
-
throwIt
IfDBExceptionHolder
has an exception, this method throw it, otherwise do nothing.- Throws:
DataBushPackedException
- if any.
-
maxCode
public int maxCode()maxCode.
- Returns:
- a int
-