Class XTCEDatabaseException

  • All Implemented Interfaces:
    Serializable

    public class XTCEDatabaseException
    extends Exception
    The XTCEDatabaseException class serves to simplify management of exceptions in the toolkit by distinguishing toolkit exceptions from unhandled system exceptions. Toolkit users should generally not need several catch blocks in their client code. This exception is almost always what will be thrown. The toolkit attempts to convert other exceptions when it is known what will trigger those exceptions, in order to add more descriptive information than otherwise would be provided by the general system exceptions.
    Author:
    David Overeem
    See Also:
    Serialized Form
    • Constructor Detail

      • XTCEDatabaseException

        public XTCEDatabaseException​(String message)
        Constructor for a String Message
        Parameters:
        message - String containing the exception message.
      • XTCEDatabaseException

        public XTCEDatabaseException​(String message,
                                     Throwable ex)
        Constructor to initialize an XTCEDatabaseException from a generally uninformative Java Throwable.
        Parameters:
        message - String message to associate with the exception, where the Throwable did not provide anything helpful, but the toolkit knows the cause.
        ex - Throwable to copy from.
      • XTCEDatabaseException

        public XTCEDatabaseException​(Exception ex)
        Constructor to initialize an XTCEDatabaseException from a generally informative Java Exception.
        Parameters:
        ex - Exception base class that was instantiated with a decent and descriptive error message.
      • XTCEDatabaseException

        public XTCEDatabaseException​(jakarta.xml.bind.MarshalException ex)
        Constructor to initialize an XTCEDatabaseException from a JAXB MarshalException, which needs to be handled via the getCause() instead of the more common getLocalizedMessage(), so this converts the text from the cause to the localized message accessor.
        Parameters:
        ex - MarshalException thrown by JAXB.
      • XTCEDatabaseException

        public XTCEDatabaseException​(XPathException ex)
        Constructor to initialize an XTCEDatabaseException from an XPath Exception, which needs to be handled via the getCause() instead of the more common getLocalizedMessage(), so this converts the text from the cause to the localized message accessor.
        Parameters:
        ex - XPathException thrown by the XPath evaluate function.
      • XTCEDatabaseException

        public XTCEDatabaseException​(List<String> messages)
        Constructor to initialize an XTCEDatabaseException from a list of collected messages.
        Parameters:
        messages - List of Strings containing feedback during a long operation that may collect many interesting errors, but can proceed until completion.