Property | Type | Description | |
---|---|---|---|
$debug | boolean | Indicates if we are in debug mode. | |
$format | array | Generic response format. | |
$handlers | array | Array of exception handlers. | |
$parentHandler | Illuminate\Contracts\Debug\ExceptionHandler | The parent Illuminate exception handler instance. | |
$replacements | array | User defined replacements to merge with defaults. |
Method | Description | |
---|---|---|
__construct ( Illuminate\Contracts\Debug\ExceptionHandler $parentHandler, array $format, boolean $debug ) : void | Create a new exception handler instance. | |
getHandlers ( ) : array | Get the exception handlers. | |
handle ( Exception $exception ) : Illuminate\Http\Response | Handle an exception if it has an existing handler. | |
register ( callable $callback ) : void | Register a new exception handler. | |
render ( Dingo\Api\Http\Request $request, Exception $exception ) : mixed | Render an exception into an HTTP response. | |
renderForConsole ( Symfony\Component\Console\Output\OutputInterface $output, Exception $exception ) : mixed | Render an exception to the console. | |
report ( Exception $exception ) : void | Report or log an exception. | |
setDebug ( boolean $debug ) : void | Set the debug mode. | |
setErrorFormat ( array $format ) : void | Set the error format array. | |
setReplacements ( array $replacements ) : void | Set user defined replacements. |
Method | Description | |
---|---|---|
genericResponse ( Exception $exception ) : Illuminate\Http\Response | Handle a generic error response if there is no handler available. | |
getExceptionStatusCode ( Exception $exception, integer $defaultStatusCode = 500 ) : integer | Get the exception status code. | |
getHeaders ( Exception $exception ) : array | Get the headers from the exception. | |
getStatusCode ( Exception $exception ) : integer | Get the status code from the exception. | |
handlerHint ( callable $callback ) : string | Get the hint for an exception handler. | |
newResponseArray ( ) : array | Create a new response array with replacement values. | |
prepareReplacements ( Exception $exception ) : array | Prepare the replacements array by gathering the keys and values. | |
recursivelyRemoveEmptyReplacements ( array $input ) : array | Recursirvely remove any empty replacement values in the response array. | |
runningInDebugMode ( ) : boolean | Determines if we are running in debug mode. |
protected genericResponse ( Exception $exception ) : Illuminate\Http\Response | ||
$exception | Exception | |
return | Illuminate\Http\Response |
protected getExceptionStatusCode ( Exception $exception, integer $defaultStatusCode = 500 ) : integer | ||
$exception | Exception | |
$defaultStatusCode | integer | |
return | integer |
protected getHeaders ( Exception $exception ) : array | ||
$exception | Exception | |
return | array |
protected getStatusCode ( Exception $exception ) : integer | ||
$exception | Exception | |
return | integer |
public handle ( Exception $exception ) : Illuminate\Http\Response | ||
$exception | Exception | |
return | Illuminate\Http\Response |
protected handlerHint ( callable $callback ) : string | ||
$callback | callable | |
return | string |
protected newResponseArray ( ) : array | ||
return | array |
protected prepareReplacements ( Exception $exception ) : array | ||
$exception | Exception | |
return | array |
protected recursivelyRemoveEmptyReplacements ( array $input ) : array | ||
$input | array | |
return | array |
public renderForConsole ( Symfony\Component\Console\Output\OutputInterface $output, Exception $exception ) : mixed | ||
$output | Symfony\Component\Console\Output\OutputInterface | |
$exception | Exception | |
return | mixed |
protected runningInDebugMode ( ) : boolean | ||
return | boolean |
public setErrorFormat ( array $format ) : void | ||
$format | array | |
return | void |
public setReplacements ( array $replacements ) : void | ||
$replacements | array | |
return | void |
protected bool $debug | ||
return | boolean |
protected ExceptionHandler,Illuminate\Contracts\Debug $parentHandler | ||
return | Illuminate\Contracts\Debug\ExceptionHandler |
protected array $replacements | ||
return | array |