LaravelDeployerException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A __toString() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: reallyli
5
 * Date: 18/9/28
6
 * Time: 下午12:20.
7
 */
8
9
namespace Reallyli\LaravelDeployer;
10
11
/**
12
 * 自定义一个异常处理类.
13
 */
14
class LaravelDeployerException extends \Exception
15
{
16
    protected $message = '[Laravel-Deployer-Exception]';
17
18
    public function __construct($message, $code = 0, \Exception $previous = null)
19
    {
20
        $message = $this->message.$message;
21
22
        parent::__construct($message, $code, $previous);
23
    }
24
25
    public function __toString()
26
    {
27
        return __CLASS__.": $this->message[{$this->code}]: {$this->message}\n";
28
    }
29
}
30