NotFoundException
extends Exception
in package
Exception class for not found errors.
This exception is thrown when a requested resource is not found in the application. It extends the base Exception class and adds an error code to identify the specific not found error. The error code can be retrieved using the 'getErrorCode' method.
Tags
Table of Contents
- $errorCode : string
- __construct() : mixed
- Constructor for the NotFoundException.
- getErrorCode() : string
- Get the error code for the not found error.
Properties
$errorCode
private
string
$errorCode
The error code for the not found error.
Methods
__construct()
Constructor for the NotFoundException.
public
__construct(string $code, string $message[, Exception|null $previous = null ]) : mixed
Parameters
- $code : string
-
The error code for the not found error.
- $message : string
-
The error message.
- $previous : Exception|null = null
-
The previous exception used for chaining.
Return values
mixed —getErrorCode()
Get the error code for the not found error.
public
getErrorCode() : string
Return values
string —The error code.