Class BatchProcessingException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
chemaxon.formats.documents.jchemoffice.BatchProcessingException
All Implemented Interfaces:
Serializable

@PublicApi public class BatchProcessingException extends IOException
Specific exception class that collects possible internal exceptions from the batch actions defined on the following
  • IDocumentWriter,
  • IDocumentReader
  • IDocumentConverter interfaces.

    Collects and raise exception.

See Also:
  • Constructor Details

    • BatchProcessingException

      public BatchProcessingException(String message)
      Constructor accepting the main message that needs to be mediated to the user.
      Parameters:
      message - The detail message (which is saved for later retrieval by the Throwable.getMessage() method)
  • Method Details

    • addCause

      public void addCause(Throwable cause)
      Adds the caused internal exception to be collected for later use.
      Parameters:
      cause - The cause (which is another internal exception saved for later retrieval by the getExceptions() method). -
      Throws:
      Exception
    • getExceptions

      public List<Throwable> getExceptions()
      Returns with all collected internal reasons why the batch process failed overall.
      Returns:
      List of throwable problems (causes).
    • size

      public int size()
      Determines the size/number of the issue occurred during the batch workflow.
      Returns:
      Integer value representing the size of the collection.
    • get

      public Throwable get(int index)
      Returns with the specific cause from the list of causes.
      Parameters:
      index - Position of the cause in the list by this index parameter.
    • clear

      public void clear()
      Deletes all exceptions inside.
    • throwThemWhenNeed

      public void throwThemWhenNeed() throws BatchProcessingException
      Throws the exceptions if there are some ...
      Throws:
      BatchProcessingException