PHP Exceptions\Data Namespace

Classes

Name Description
FormatException Use this exception when the format of data passed to your code does not fit expected format. For example:.
IntegrityException Use this exception when the data passed to your code would create an integrity issue. For example, the storage engine you are using complains that a foreign key or constraint is being violated.
NotFoundException Use this exception when the data requested by your code cannot be found. In most scenarios, this is the equivalent of an item that cannot be found in a filesystem or in a database. The big difference is that this item is not linked to a specific context such as the filesystem nor is it linked to the HTTP context.
TypeException The data provided to your code is not of the right type. This is part of the validation group of exceptions but pertains to type validation. You received an int and were expecting an object but did not want to use type hinting for flexibility? Throw this exception!
ValidationException The data provided to your code is not following expected validations. These validations should be considered as any of the business model validations or domain validation. Something does not pass the basic validation steps, then you should throw this.