public function SmartlingApiException::__construct in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.2 api-sdk-php/src/Exceptions/SmartlingApiException.php \Smartling\Exceptions\SmartlingApiException::__construct()
- 8.2 vendor/smartling/api-sdk-php/src/Exceptions/SmartlingApiException.php \Smartling\Exceptions\SmartlingApiException::__construct()
- 8.3 vendor/smartling/api-sdk-php/src/Exceptions/SmartlingApiException.php \Smartling\Exceptions\SmartlingApiException::__construct()
SmartlingApiException constructor.
Parameters
string|array $errors:
int $code:
\Exception $previous:
File
- vendor/
smartling/ api-sdk-php/ src/ Exceptions/ SmartlingApiException.php, line 37
Class
- SmartlingApiException
- Class SmartlingApiException @package Smartling\Exceptions
Namespace
Smartling\ExceptionsCode
public function __construct($errors, $code = 0, \Exception $previous = null) {
$message = '';
if (is_string($errors)) {
$message = $errors;
}
elseif (is_array($errors)) {
$message = print_r($errors, TRUE);
$this->errors = $errors;
}
parent::__construct($message, $code, $previous);
}