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
FieldsModifier and TypeFieldDescriptionArray with exception packed into this one.Fields inherited from class org.scictrl.mp.orbitcorrect.DataBushException
code, source -
Constructor Summary
ConstructorsConstructorDescriptionCreate empty exception, will not be thrown.DataBushPackedException(String message, int code) PackedDBExceptionconstructor with specified parameters.Created packed exception with provided exception as initial element.DataBushPackedException(AbstractDataBushElement source, String s, int code) PackedDBExceptionconstructor with specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionintcount()count.protected StringReturns the fully-qualified name of the entity represented by thisDataBushExceptionobject, as aString.intmaxCode()maxCode.intpack(DataBushException dbe) PAcks an exception into this one.voidthrowIt()IfDBExceptionHolderhas 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, getSourceMethods 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
PackedDBExceptionconstructor with specified parameters.- Parameters:
message- the messagecode- the error code
-
DataBushPackedException
PackedDBExceptionconstructor 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 thisDataBushExceptionobject, as aString. Returns the fully-qualified name of the entity represented by thisDataBushExceptionobject, as aString.- Overrides:
getClassNamein 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 byformatMessageoutput. Actually it is extended with name, returned bygetClassName. This method return string that describe this class object.- Overrides:
toStringin classDataBushException- See Also:
-
throwIt
IfDBExceptionHolderhas an exception, this method throw it, otherwise do nothing.- Throws:
DataBushPackedException- if any.
-
maxCode
public int maxCode()maxCode.
- Returns:
- a int
-