Passed
Push — master ( 679003...d4b684 )
by Aimeos
09:05
created

Exception   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDetails() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2021
6
 * @package Admin
7
 * @subpackage JQAdm
8
 */
9
10
11
namespace Aimeos\Admin\JQAdm;
12
13
14
/**
15
 * Generic exception thrown by JQAdm Admin objects if no specialized exception is available.
16
 *
17
 * @package Admin
18
 * @subpackage JQAdm
19
 */
20
class Exception extends \Exception
21
{
22
	private $details;
23
24
25
	/**
26
	 * Initializes the object.
27
	 *
28
	 * @param string $message Exception message
29
	 * @param int $code Custom exception code
30
	 * @param mixed $details Custom exception details
31
	 */
32
	public function __construct( string $message = '', int $code = 0, $details = null )
33
	{
34
		parent::__construct( $message, $code );
35
36
		$this->details = $details;
37
	}
38
39
40
	/**
41
	 * Returns the custom exception details
42
	 *
43
	 * @return mixed Custom exception details
44
	 */
45
	public function getDetails()
46
	{
47
		return $this->details;
48
	}
49
}
50