mirror of
				https://gitee.com/ledc/IYUUAutoReseed
				synced 2025-10-27 23:09:53 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			49 lines
		
	
	
		
			1017 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1017 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Created by PhpStorm.
 | |
|  * User: Rhilip
 | |
|  * Date: 1/17/2020
 | |
|  * Time: 2020
 | |
|  */
 | |
| 
 | |
| namespace IYUU\Client\Transmission;
 | |
| 
 | |
| /**
 | |
|  * This is the type of exception the TransmissionRPC class will throw
 | |
|  */
 | |
| class TransmissionRPCException extends \Exception
 | |
| {
 | |
|     /**
 | |
|      * Exception: Invalid arguments
 | |
|      */
 | |
|     const E_INVALIDARG = -1;
 | |
| 
 | |
|     /**
 | |
|      * Exception: Invalid Session-Id
 | |
|      */
 | |
|     const E_SESSIONID = -2;
 | |
| 
 | |
|     /**
 | |
|      * Exception: Error while connecting
 | |
|      */
 | |
|     const E_CONNECTION = -3;
 | |
| 
 | |
|     /**
 | |
|      * Exception: Error 401 returned, unauthorized
 | |
|      */
 | |
|     const E_AUTHENTICATION = -4;
 | |
| 
 | |
|     /**
 | |
|      * Exception constructor
 | |
|      */
 | |
|     public function __construct($message = null, $code = 0, \Exception $previous = null)
 | |
|     {
 | |
|         // PHP version 5.3.0 and above support Exception linking
 | |
|         if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
 | |
|             parent::__construct($message, $code, $previous);
 | |
|         } else {
 | |
|             parent::__construct($message, $code);
 | |
|         }
 | |
|     }
 | |
| }
 |