1 <?php
2
3 namespace HieuLe\WordpressXmlrpcClient\Exception;
4
5 /**
6 * An error occurs when connecting to the wordpress server
7 *
8 * @author TrungHieu
9 */
10 class NetworkException extends \Exception
11 {
12 public function __construct($message, $code)
13 {
14 parent::__construct($message, $code, null);
15 }
16
17 public function __toString()
18 {
19 return "Network error: {$this->message} (Code: {$this->code})";
20 }
21 }
22