public function __construct($message = '', $code = 500, Exception $previous = null) { if (empty($message)) { $message = \JText::_('LIB_FOF_MODEL_ERR_NOASSETKEY'); } parent::__construct($message, $code, $previous); }
public function __construct($message = "", $code = 0, \Exception $previous = null) { // We can only use pg_result_error_field() with async queries, so just parse the message // instead. See function pqGetErrorNotice3() in src/interfaces/libpq/fe-protocol3.c if (preg_match("/^[^\\r\\n]+: ([A-Z0-9]{5}):/", $message, $m)) { $this->_sqlState = $m[1]; } parent::__construct($message, $code, $previous); }
/** * @param string $filterName * @param Exception $previous */ public function __construct($filterName, Exception $previous = null) { $this->filterName = $filterName; $message = sprintf('Unknown filter: %s', $filterName); if (version_compare(PHP_VERSION, '5.3.0', '>=')) { parent::__construct($message, 0, $previous); } else { parent::__construct($message); } }
public function __construct($message = null, $response = null) { if (empty($message)) { $message = 'Desk.com API call failed'; } if ($response instanceof Response) { $response = $response->getBody(); } else { if (!is_string($response)) { $response = null; } } if (!empty($response)) { $message .= ' -- Full response body: ' . (string) $response; } else { $message .= ' -- No response body received'; } parent::__construct($message); }
public function __construct($physicalMessageId, \Exception $previous = null) { parent::__construct("An error occurred while attempting to extract a logical message from the physical message with ID '{$physicalMessageId}'", 0, $previous); }
/** * @param mixed $keyType * @param int $code * @param \Exception $previous */ public function __construct($keyType, $code = 0, \Exception $previous = null) { parent::__construct(sprintf('Variables of type "%s" cannot be used as keys.', $keyType), $code, $previous); }
public function __construct($className, $code = 500, Exception $previous = null) { $message = \JText::sprintf('LIB_FOF_MODEL_ERR_NOCONTENTTYPE', $className); parent::__construct($message, $code, $previous); }
public function __construct($code = 0) { parent::__construct('DocRaptor returned an unexpected response (' . $code . ')', $code); }
/** * @param string $message * @param Error[] $errors */ public function __construct($message, $errors) { parent::__construct($message); $this->errors = $errors; }
public function __construct($reference, $code = 0) { BaseException::__construct("Storage item not found with this reference: {$reference}", $code); }
/** * This constructor creates a new runtime exception. * * @access public * @param string $message the error message * @param array $values the value to be formatted * @param IInt32\Type $code the exception code */ public function __construct($message = '', array $values = null, IInt32\Type $code = null) { parent::__construct(empty($values) ? (string) $message : strtr((string) $message, $values), IInt32\Module::nvl($code)->unbox()); }
/** * Constructor. * * @param string $address The email address that fails its verification. * @param Diagnosis $diagnosis The diagnosis * @param Exception $previous The previous exception used for the exception chaining. */ public function __construct($address, Diagnosis $diagnosis, \Exception $previous = null) { parent::__construct(sprintf('Invalid email address "%s": %s', $address, $diagnosis->description), $diagnosis->severity, $previous); }
protected function executeDelayedCall($function, $args, $errorResultCode, Deferred $deferred) { $this->register(); $args[] = EIO_PRI_DEFAULT; $args[] = function ($data, $result, $req) use($deferred, $errorResultCode, $function, $args) { if ($result == $errorResultCode) { $exception = new UnexpectedValueException(@eio_get_last_error($req)); $exception->setArgs($args); $deferred->reject($exception); return; } $deferred->resolve($result); }; if (!call_user_func_array($function, $args)) { $name = $function; if (!is_string($function)) { $name = get_class($function); } $exception = new RuntimeException('Unknown error calling "' . $name . '"'); $exception->setArgs($args); $deferred->reject($exception); } }
public function __construct($message = 'Unexpected value returned by internal call', $code = 0, $previous = NULL) { parent::__construct($message, $code, $previous); }
/** * The constructor does what you would expect it to. * * @author Daniel Sherman * @param string $message the message for the exception * @param integer $code the code for the exception * @param \Exception $previous A previous exception * @param array $context the array that will be returned along with the * exception. * @uses setId * @uses context */ public function __construct($message = null, $code = 0, $previous = null, array $context = []) { parent::__construct($message, $code, $previous); $this->setId(); $this->context = $context; }
public function __construct($message, $context = null) { $context = !is_null($context) ? "\n" . self::ARGUMENT . '"' . $context . '"' : null; parent::__construct('Detected invalid ' . $message . $context); }
public function __construct(\Exception $previous = null) { parent::__construct('Attempted dividing by zero.', 0, $previous); }
/** * @param int $code */ public function __construct($code) { parent::__construct(isset($this->_jsonErrors[$code]) ? $this->_jsonErrors[$code] : $this->_jsonErrors[-1], $code); }
public function __construct($message = "", $code = 0, $previous = null) { parent::__construct($message, $code, $previous); //todo: generate error code. }
public function __construct() { parent::__construct('Can not store value', self::CANNOT_STORE); }
public function __construct($contentType) { parent::__construct(sprintf('No serializer for content type %s available.', $contentType)); }
/** * @param string $returnedType * @param int $code * @param \Exception|null */ public function __construct($returnedType, $code = 0, $previous = null) { $message = 'Function "modifyField" closure argument is expected to return a StoutLogic\\AcfBuilder\\FieldsBuilder, ' . $returnedType . ' returned instead.'; parent::__construct(trim($message), $code, $previous); }
/** * @param mixed $value * @param string $expectedType */ public function __construct($value, $expectedType) { parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, is_object($value) ? get_class($value) : gettype($value))); }
public function __construct($tableName, $code = 500, Exception $previous = null) { $message = \JText::sprintf('LIB_FOF_MODEL_ERR_TREE_INCOMPATIBLETABLE', $tableName); parent::__construct($message, $code, $previous); }
public function __construct($filterName) { $this->filterName = $filterName; parent::__construct(sprintf('Unknown filter: %s', $filterName)); }
public function __construct($contentType, $class) { parent::__construct(sprintf('Invalid serializer for content type %s, instances of %s are not castable to string.', $contentType, $class)); }
public function __construct($name, $value, $expectedType) { parent::__construct(sprintf('Expected %s to have type "%s" but found "%s"', $name, $expectedType, is_object($value) ? get_class($value) : gettype($value))); }
public function __construct($message = "", \Reflector $reflector = NULL, $previous = NULL) { parent::__construct($message, $previous ? $previous->getCode() : 0, $previous); $this->reflector = $reflector; }
/** * @param string $expected Expected type * @param mixed $value Received value * @param boolean $native Expected a native type? * @param \Exception $previous */ public function __construct($expected, $value, $native = false, \Exception $previous = null) { $valType = is_object($value) ? get_class($value) . ' instance' : gettype($value); $expType = $expected . ($native ? ' value' : ' instance'); $message = sprintf('Expected %s, but received %s', $expType, $valType); parent::__construct($message, 0, $previous); }
/** * Constructs a library exception. * * @param \Drupal\libraries\ExternalLibrary\ExternalLibraryInterface $library * The library with the invalid dependency. * @param \Drupal\libraries\ExternalLibrary\ExternalLibraryInterface $dependency * The dependency. * @param string $message * (optional) The exception message. * @param int $code * (optional) The error code. * @param \Exception $previous * (optional) The previous exception. */ public function __construct(ExternalLibraryInterface $library, ExternalLibraryInterface $dependency, $message = '', $code = 0, \Exception $previous = NULL) { $this->library = $library; $this->dependency = $dependency; $message = $message ?: "The library '{$this->library->getId()}' cannot depend on the library '{$this->dependency->getId()}'."; parent::__construct($message, $code, $previous); }