class ServicesArgumentException in Services 7.3
Same name and namespace in other branches
- 6.3 services.runtime.inc \ServicesArgumentException
A exception thrown by services and related modules when an error related to a specific argument is encountered.
Hierarchy
- class \ServicesException extends \Exception
- class \ServicesArgumentException
Expanded class hierarchy of ServicesArgumentException
File
- includes/
services.runtime.inc, line 48 - Contains functions that only are necessary when a service call is made. This has broken out so that this code isn't loaded for every page load.
View source
class ServicesArgumentException extends ServicesException {
private $argument;
/**
* Constructor for the ServicesException.
*
* @param string $message
* Error message.
* @param string $argument_name
* The name of the argument that caused the error.
* @param int $code
* Optional. Error code. This often maps to the HTTP status codes. Defaults
* to 0.
* @param mixed $data
* Information that can be used by the server to return information about
* the error.
*/
public function __construct($message, $argument_name, $code, $data) {
parent::__construct($message, $code, $data);
$this->argument = $argument_name;
}
/**
* Returns the name of the argument that caused the error.
*
* @return string
* The name of the argument.
*/
public function getArgumentName() {
return $this->argument;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServicesArgumentException:: |
private | property | ||
ServicesArgumentException:: |
public | function | Returns the name of the argument that caused the error. | |
ServicesArgumentException:: |
public | function |
Constructor for the ServicesException. Overrides ServicesException:: |
|
ServicesException:: |
private | property | ||
ServicesException:: |
public | function | Returns the data associated with the exception. |