Package org.planit.utils.exceptions
Class PlanItException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.planit.utils.exceptions.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 Summary
Constructors Constructor Description PlanItException(Exception parentException)Constructor using Exception - wraps run-time exceptionsPlanItException(String exceptionDescription)Constructor using String - catches logic-driven exceptionsPlanItException(String exceptionDescription, Throwable cause)Constructor using Throwable - wraps run-time exceptions with additional message
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidthrowIf(boolean condition, String message)Throw a planitException if condition is met-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
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
-
-
Method Detail
-
throwIf
public static void throwIf(boolean condition, String message) throws PlanItExceptionThrow a planitException if condition is met- Parameters:
condition- when met we throwmessage- for exception- Throws:
PlanItException- thrown when condition not met
-
-