Class PlanItException

  • All Implemented Interfaces:
    Serializable

    public class PlanItException
    extends Exception
    General exception for PlanIt which wraps exceptions thrown during execution
    Author:
    markr
    See Also:
    Serialized Form
    • Constructor Detail

      • PlanItException

        public PlanItException​(String exceptionDescription)
        Constructor using String - catches logic-driven exceptions
        Parameters:
        exceptionDescription - text containing description of logic error
      • PlanItException

        public PlanItException​(Exception parentException)
        Constructor using Exception - wraps run-time exceptions
        Parameters:
        parentException - source exception
      • PlanItException

        public PlanItException​(String exceptionDescription,
                               Throwable cause)
        Constructor using Throwable - wraps run-time exceptions with additional message
        Parameters:
        exceptionDescription - message
        cause - original exception cause
    • Method Detail

      • throwIf

        public static void throwIf​(boolean condition,
                                   String message)
                            throws PlanItException
        Throw a planitException if condition is met
        Parameters:
        condition - when met we throw
        message - for exception
        Throws:
        PlanItException - thrown when condition not met
      • throwIfNull

        public static void throwIfNull​(Object object,
                                       String message)
                                throws PlanItException
        Throw a planitException if object is null
        Parameters:
        object - to test
        message - for exception
        Throws:
        PlanItException - thrown when condition not met