迁移文件

This commit is contained in:
Rhilip
2020-01-17 10:59:48 +08:00
parent 86b7dcb552
commit 27104bd9a2
13 changed files with 101 additions and 145 deletions

View 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);
}
}
}