|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Defines an exception class for all php Errors. |
|
5
|
|
|
* ErrorException properties and methods http://php.net/manual/en/class.errorexception.php |
|
6
|
|
|
* Exception properties and methods http://www.php.net/manual/en/class.exception.php |
|
7
|
|
|
*/ |
|
8
|
|
|
class ZarafaErrorException extends BaseException |
|
9
|
|
|
{ |
|
10
|
|
|
/** |
|
11
|
|
|
* errcontext is an array that points to the active symbol table at the point the error occurred. |
|
12
|
|
|
* In other words, errcontext will contain an array of every variable that existed in the scope |
|
13
|
|
|
* the error was triggered in. User error handler must not modify error context. |
|
14
|
|
|
*/ |
|
15
|
|
|
protected $errorContext = null; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Constructs the Exception. |
|
19
|
|
|
* |
|
20
|
|
|
* @param string $errorMessage The exception message |
|
21
|
|
|
* @param int $code The Exception code |
|
22
|
|
|
* @param string $filename The filename where the exception is thrown. |
|
23
|
|
|
* @param string $lineno The line number where the exception is thrown. |
|
24
|
|
|
* @param string $displayMessage The exception message to show at client side. |
|
25
|
|
|
* @return void |
|
26
|
|
|
*/ |
|
27
|
|
|
public function __construct($errorMessage, $code = 0, $filename , $lineno, $errorContext = null, $displayMessage = null) |
|
28
|
|
|
{ |
|
29
|
|
|
$this->errorContext = $errorContext; |
|
30
|
|
|
|
|
31
|
|
|
if(!$displayMessage) { |
|
32
|
|
|
$displayMessage = _('Action is not performed correctly.'); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
parent::__construct($errorMessage, $code, null, $displayMessage); |
|
36
|
|
|
$this->setFile($filename); |
|
37
|
|
|
$this->setLineNo($lineno); |
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* Function sets the filename where the exception was thrown. |
|
43
|
|
|
* @param string filename name of the file where exception was thrown. |
|
|
|
|
|
|
44
|
|
|
*/ |
|
45
|
|
|
protected function setFile($filename = '') |
|
46
|
|
|
{ |
|
47
|
|
|
$this->file = $filename; |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
/** |
|
51
|
|
|
* Function sets the line where the exception was thrown. |
|
52
|
|
|
* @param string lineno no of the line in file where exception was thrown. |
|
|
|
|
|
|
53
|
|
|
*/ |
|
54
|
|
|
protected function setLineNo($lineno = '') |
|
55
|
|
|
{ |
|
56
|
|
|
$this->line = $lineno; |
|
57
|
|
|
} |
|
58
|
|
|
} |
|
59
|
|
|
?> |
|
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths