-
Notifications
You must be signed in to change notification settings - Fork 1
/
ExceptionInterface.php
56 lines (52 loc) · 1.49 KB
/
ExceptionInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Bright Nucleus Exception Interface.
*
* All exceptions used in the Bright Nucleus framework both implement this base
* interface, and extend one of the SPL extensions. This way, you have several
* ways of catching specific extension groups:
*
* 1. Catch all exceptions: `\Exception`
*
* 2. Catch all exceptions thrown by a Bright Nucleus library:
* `\BrightNucleus\Exception\ExceptionInterface`
*
* 3. Catch a specific SPL exception (BrightNucleus or not): `\LogicException`
*
* 4. Catch a specific SPL exception thrown by a Bright Nucleus library:
* `\BrightNucleus\Exception\LogicException`
*
* @package BrightNucleus\Exception
* @author Alain Schlesser <alain.schlesser@gmail.com>
* @license GPL-2.0+
* @link http://www.brightnucleus.com/
* @copyright 2015-2016 Alain Schlesser, Bright Nucleus
*/
namespace BrightNucleus\Exception;
/**
* Interface ExceptionInterface.
*
* @since 0.1.0
*
* @package BrightNucleus\Exception
* @author Alain Schlesser <alain.schlesser@gmail.com>
*/
interface ExceptionInterface
{
/**
* Get the name of the module that has thrown the exception.
*
* @since 1.0.0
*
* @return string Name of the module that has thrown the exception.
*/
public function getModule();
/**
* Set the name of the module that has thrown the exception.
*
* @since 1.0.0
*
* @param string $module Name of the module that has thrown the exception.
*/
public function setModule($module);
}