Exceptions

Purpose

These are the exceptions that this library can throw.

Exceptions List

Assurance Exceptions

Class Description
BadAssurance thrown when you pass something that isn't an assurance into one of the Assurance classes
BadAssuranceArgs thrown when you pass something that isn't a list of arguments into one of the Assurance classes
BadAssurancesList thrown when you pass something that isn't a list of assurances into one of the Assurance classes
EmptyAssurancesList thrown when you pass an empty list into one of the Assurance classes

Check Exceptions

Class Description
BadCheck thrown when you pass something that isn't a check into one of the Checks classes
BadCheckArgs thrown when you pass something that isn't a list of arguments into one of the Checks classes
BadChecksList thrown when you pass something that isn't a list of checks into one of the Checks classes
EmptyChecksList thrown when you pass an empty list into one of the Checks classes

Requirements Exceptions

Class Description
BadRequirement thrown when you pass something that isn't a requirement into one of the Requirements classes
BadRequirements thrown when you pass something that isn't a requirements list into one of the Requirements classes
BadRequirementArgs thrown when you pass something that isn't a list of arguments into one of the Requirements classes
EmptyRequirementsList thrown when you pass an empty requirements list into one of the Requirements classes

Other Exceptions

Class Description
BadCallable thrown when you pass a non-callable into something that is expecting a valid PHP callable
UnreachableCodeExecuted thrown when switch or if / else logic reaches a branch that should never be reached
UnsupportedType thrown when you pass the wrong data type into one of the Requirements classes
UnsupportedValue thrown when you pass in a parameter that has the right data type, but a value that can't be accepted

Exceptions Container

DefensiveExceptions provides a full list of exception factories as a FactoryList.

Click on the name of an exception to see full details.