RrdGraphException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 2
b 0
f 0
dl 0
loc 13
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getImage() 0 3 1
A __construct() 0 4 1
1
<?php
2
/*
3
 * RrdGraphException.php
4
 *
5
 * Exception generated when there is an error creating the graph image
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 *
20
 * @package    LibreNMS
21
 * @link       http://librenms.org
22
 * @copyright  2021 Tony Murray
23
 * @author     Tony Murray <[email protected]>
24
 */
25
26
namespace LibreNMS\Exceptions;
27
28
use Exception;
29
30
class RrdGraphException extends Exception
31
{
32
    protected $image_output;
33
34
    public function __construct($error, $exit_code, $image_output)
35
    {
36
        parent::__construct($error, $exit_code);
37
        $this->image_output = $image_output;
38
    }
39
40
    public function getImage()
41
    {
42
        return $this->image_output;
43
    }
44
}
45