Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (Phrase $phrase, $code=0, $httpCode=self::HTTP_BAD_REQUEST, array $details=[], $name='', $errors=null, $stackTrace=null) | |
getHttpCode () | |
getOriginator () | |
getDetails () | |
getName () | |
getErrors () | |
getStackTrace () | |
![]() | |
__construct (Phrase $phrase, \Exception $cause=null, $code=0) | |
getRawMessage () | |
getParameters () | |
getLogMessage () | |
Data Fields | |
const | HTTP_BAD_REQUEST = 400 |
const | HTTP_UNAUTHORIZED = 401 |
const | HTTP_FORBIDDEN = 403 |
const | HTTP_NOT_FOUND = 404 |
const | HTTP_METHOD_NOT_ALLOWED = 405 |
const | HTTP_NOT_ACCEPTABLE = 406 |
const | HTTP_INTERNAL_ERROR = 500 |
const | FAULT_CODE_SENDER = 'Sender' |
const | FAULT_CODE_RECEIVER = 'Receiver' |
Protected Attributes | |
$_details | |
$_httpCode | |
$_name | |
$_stackTrace | |
$_errors | |
![]() | |
$phrase | |
$logMessage | |
Web API exception should not be used directly by any modules except for Magento_Webapi.
During web API requests, all exceptions are converted to this exception, which is then used for proper error response generation.
Definition at line 20 of file Exception.php.
__construct | ( | Phrase | $phrase, |
$code = 0 , |
|||
$httpCode = self::HTTP_BAD_REQUEST , |
|||
array | $details = [] , |
||
$name = '' , |
|||
$errors = null , |
|||
$stackTrace = null |
|||
) |
Initialize exception with HTTP code.
\Magento\Framework\Phrase | $phrase | |
int | $code | Error code |
int | $httpCode | |
array | $details | Additional exception details |
string | $name | Exception name |
Only HTTP error codes are allowed. No success or redirect codes must be used.
Definition at line 95 of file Exception.php.
getDetails | ( | ) |
getErrors | ( | ) |
Retrieve list of errors.
Definition at line 162 of file Exception.php.
getHttpCode | ( | ) |
getName | ( | ) |
getOriginator | ( | ) |
Identify exception originator: sender or receiver.
Definition at line 132 of file Exception.php.
getStackTrace | ( | ) |
|
protected |
Definition at line 52 of file Exception.php.
|
protected |
Definition at line 80 of file Exception.php.
|
protected |
Definition at line 59 of file Exception.php.
|
protected |
Definition at line 66 of file Exception.php.
|
protected |
Definition at line 73 of file Exception.php.
const FAULT_CODE_RECEIVER = 'Receiver' |
Definition at line 45 of file Exception.php.
const FAULT_CODE_SENDER = 'Sender' |
#- #+ Fault codes that are used in SOAP faults.
Definition at line 44 of file Exception.php.
const HTTP_BAD_REQUEST = 400 |
Definition at line 25 of file Exception.php.
const HTTP_FORBIDDEN = 403 |
Definition at line 29 of file Exception.php.
const HTTP_INTERNAL_ERROR = 500 |
Definition at line 37 of file Exception.php.
const HTTP_METHOD_NOT_ALLOWED = 405 |
Definition at line 33 of file Exception.php.
const HTTP_NOT_ACCEPTABLE = 406 |
Definition at line 35 of file Exception.php.
const HTTP_NOT_FOUND = 404 |
Definition at line 31 of file Exception.php.
const HTTP_UNAUTHORIZED = 401 |
Definition at line 27 of file Exception.php.