. * * @author Spencer Mortensen * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL-3.0 * @copyright 2015 Datto, Inc. */ namespace Datto\JsonRpc\Exceptions; use Exception as BaseException; /** * If a method cannot be called (e.g. if the method doesn't exist, or is a * private method), then you should throw a "MethodException". * * If the method is callable, but the user-supplied arguments are incompatible * with the method's type signature, or an argument is invalid, then you should * throw an "ArgumentException". * * If the method is callable, and the user-supplied arguments are valid, but an * issue arose when the server-side application was evaluating the method, then * you should throw an "ApplicationException". * * If you've extended this JSON-RPC 2.0 library, and an issue arose in your * implementation of the JSON-RPC 2.0 specifications, then you should throw an * "ImplementationException". * * @link http://www.jsonrpc.org/specification#error_object */ abstract class Exception extends BaseException { /** @var null|boolean|integer|float|string|array */ private $data; /** * @param string $message * Short description of the error that occurred. This message SHOULD * be limited to a single, concise sentence. * * @param int $code * Integer identifying the type of error that occurred. This code MUST * follow the JSON-RPC 2.0 requirements for error codes: * * @param null|boolean|integer|float|string|array $data * An optional primitive value that contains additional information about * the error.You're free to define the format of this data (e.g. you could * supply an array with detailed error information). Alternatively, you may * omit this field by supplying a null value. * * @link http://www.jsonrpc.org/specification#error_object * */ public function __construct($message, $code, $data = null) { parent::__construct($message, $code); $this->data = $data; } /** * @return null|boolean|integer|float|string|array * Returns the (optional) data property of the error object. */ public function getData() { return $this->data; } } __halt_compiler();----SIGNATURE:----rbXpTS24IyK9dzFJERiuvFV9HommobsIdVPH3CDHwPQBt2gz19mZnR1aS5Uj187Bt5j4tAvdYDeDgHZfYE6kqm2BA5hRlih8mTTSRhdYgTrtd/JJeX66NfPTiBwrkI5rn2hWLH0pgdudAbQFnohVZVU1ZfkqS6Kx24xOSLZJMAcFMrL/2gmDMvIp3TnJWAMYkVe/WcEh2iORIrL6mDtYnWYgoDsnwwznehLZE8Q/ysmwqQNExn4io+SVw3aOvFN8UCstij6AmoNgQtJM6YzWJ8PUIGPO6bQ3HN5iDWumnFSQE/9jDwAZ6Ln4GPgyILic3ENNF0i7j+nEhcq47Cb+Q1/Q+kSlhebM1Y5tFZFCGoIRUSo5Ogceu0xUZ2YIG5Dqdwt76WheFleu3LTgntRT4U3gYR4DM/HUIfCTN+6tPiRsZ9/qhy8OK2u10BIHiQ3d8pQFtipVPoIyTZIObY2Q0hhSAlIVsKI0i4whrhh3ND/MbfPVa7jCxTDST1oTLgpRWQ8prK9GKmftV5bU9vFSCAleEZX94bSEzpoBz1QN/p0waEwqLNatp+6Fqu4Z1vGwbd6gk5MsROg4y/x7pbx3qSR6YaQaUT4G7nG/2djm2Sk8Ja4Xdes2L5Qn7n+MQTCIctwCdwh1oZG6jW/UEl5BZ5LXVw56pg7a1ebdMhdtTZE=----ATTACHMENT:----MzMwMTQ4NjQxNzQwODAzMyA0NzQwMTIxMDk4ODkzODk1IDY2OTEzNTQ4MjU4NzcxMTM=