Class DataBushPackedException

All Implemented Interfaces:
Serializable

public class DataBushPackedException extends DataBushException
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 Details

    • packed

      public DataBushException[] packed
      Array with exception packed into this one.
  • Constructor Details

    • DataBushPackedException

      public DataBushPackedException()
      Create empty exception, will not be thrown.
    • DataBushPackedException

      public DataBushPackedException(String message, int code)
      PackedDBException constructor with specified parameters.
      Parameters:
      message - the message
      code - the error code
    • DataBushPackedException

      public DataBushPackedException(AbstractDataBushElement source, String s, int code)
      PackedDBException constructor with specified parameters.
      Parameters:
      source - AbstractDataBushElement
      s - java.lang.String
      code - int
    • DataBushPackedException

      public DataBushPackedException(DataBushException dbe)
      Created packed exception with provided exception as initial element.
      Parameters:
      dbe - initial exception to be packed
  • Method Details

    • getClassName

      protected String getClassName()
      Returns the fully-qualified name of the entity represented by this DataBushException object, as a String. Returns the fully-qualified name of the entity represented by this DataBushException object, as a String.
      Overrides:
      getClassName in class DataBushException
      Returns:
      java.lang.String
    • pack

      public int pack(DataBushException dbe)
      PAcks an exception into this one.
      Parameters:
      dbe - to be packed
      Returns:
      a int
    • count

      public int count()

      count.

      Returns:
      a int
    • toString

      public String toString()
      This method create string that describe this class object. This string is different, than string, returned by formatMessage output. Actually it is extended with name, returned by getClassName. This method return string that describe this class object.
      Overrides:
      toString in class DataBushException
      See Also:
    • throwIt

      public void throwIt() throws DataBushPackedException
      If DBExceptionHolder has an exception, this method throw it, otherwise do nothing.
      Throws:
      DataBushPackedException - if any.
    • maxCode

      public int maxCode()

      maxCode.

      Returns:
      a int