mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-07-29 10:37:20 +00:00
迁移文件
This commit is contained in:
48
app/Client/Transmission/TransmissionRPCException.php
Normal file
48
app/Client/Transmission/TransmissionRPCException.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user