PHP Exceptions\Operation Namespace

Classes

Name Description
InvalidOperationException Use this exception in the event something went wrong with the state of the application and you cannot allow executing this operation because of that state. For example, processing a report with no report specified would yield an exception of type InvalidOperationException or something similar/custom based on it. This whole set of exceptions didn't exist before but should have as many operations can end up being impossible to execute.
NotImplementedException Use this exception when someone is calling a function/method that is not implemented yet. This is a good practice when implementing a lot of new functionality. Coupled to unit tests, you should not miss a NotImplementedException but at least the message is more verbose.
UnexpectedException Use this exception in the event that an operation that expected a certain result from a sub function/method call but did not get what i expected. This exception is the reversed validation exception. Instead of validating the user's input to a function, it is a means to signal that something went wrong when calling a sub components and the result is unexpected.