ApiException
extends Exception
in package
Class ApiException
Custom Exception handler for ApiOpenStudio.
Table of Contents
- $htmlCode : int
- HTML response code.
- $processor : mixed
- Processor ID.
- __construct() : mixed
- Throw an API exception. This will return a standard error object in the format requested in the header.
- getHtmlCode() : int
- Get the HTML return code.
- getProcessor() : mixed
- Get the ID of the processor.
Properties
$htmlCode
HTML response code.
private
int
$htmlCode
HTML response code.
$processor
Processor ID.
private
mixed
$processor
Methods
__construct()
Throw an API exception. This will return a standard error object in the format requested in the header.
public
__construct([string $message = 'Unknown error' ], int $code[, mixed $processor = -1 ][, int $htmlCode = 400 ][, Exception|null $previous = null ]) : mixed
Parameters
- $message : string = 'Unknown error'
-
The Exception message to throw.
- $code : int
-
The Exception code.
- $processor : mixed = -1
-
The processor where the error occurred.
- $htmlCode : int = 400
-
The HTML return code.
- $previous : Exception|null = null
-
The previous exception used for the exception chaining. Since 5.3.0.
Return values
mixed —getHtmlCode()
Get the HTML return code.
public
getHtmlCode() : int
Return values
int —Get the HTML return code.
getProcessor()
Get the ID of the processor.
public
getProcessor() : mixed
Return values
mixed —Get the processor where the error occurred.