XRL  latest
Simple XML-RPC Library (both client and server)
FaultException.php
1 <?php
2 /*
3  * This file is part of XRL, a simple XML-RPC Library for PHP.
4  *
5  * Copyright (c) 2015, XRL Team. All rights reserved.
6  * XRL is licensed under the 3-clause BSD License.
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
12 namespace fpoirotte\XRL;
13 
24 {
25  public function __construct($message = null, $code = -32000, \Exception $previous = null)
26  {
27  if ($code < -32768 || $code > -32000) {
28  throw new \InvalidArgumentException('Invalid error code');
29  }
30 
31  parent::__construct($message, $code, $previous);
32  }
33 }
An exception that is used to represent XML-RPC errors.
Definition: Exception.php:21
Abstract definition of an interoperable fault.