<?php
class HttpException extends \Exception
{
const HTTP_NOT_FOUND = 404;
const ERROR_404_RESPONSE = 'Page not found';
// One off error messages can use this method...
public static function notFound()
{
return new static("Error code 404: " . static::ERROR_404_RESPONSE);
}
}
HttpException::notFound();