1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,51 +0,0 @@ |
1 |
-<?php |
|
2 |
- |
|
3 |
-/* |
|
4 |
- * This file is part of the Symfony package. |
|
5 |
- * |
|
6 |
- * (c) Fabien Potencier <fabien@symfony.com> |
|
7 |
- * |
|
8 |
- * For the full copyright and license information, please view the LICENSE |
|
9 |
- * file that was distributed with this source code. |
|
10 |
- */ |
|
11 |
- |
|
12 |
-namespace Symfony\Component\Debug\Exception; |
|
13 |
- |
|
14 |
-/** |
|
15 |
- * Fatal Throwable Error. |
|
16 |
- * |
|
17 |
- * @author Nicolas Grekas <p@tchwork.com> |
|
18 |
- */ |
|
19 |
-class FatalThrowableError extends FatalErrorException |
|
20 |
-{ |
|
21 |
- private $originalClassName; |
|
22 |
- |
|
23 |
- public function __construct(\Throwable $e) |
|
24 |
- { |
|
25 |
- $this->originalClassName = \get_class($e); |
|
26 |
- |
|
27 |
- if ($e instanceof \ParseError) { |
|
28 |
- $severity = E_PARSE; |
|
29 |
- } elseif ($e instanceof \TypeError) { |
|
30 |
- $severity = E_RECOVERABLE_ERROR; |
|
31 |
- } else { |
|
32 |
- $severity = E_ERROR; |
|
33 |
- } |
|
34 |
- |
|
35 |
- \ErrorException::__construct( |
|
36 |
- $e->getMessage(), |
|
37 |
- $e->getCode(), |
|
38 |
- $severity, |
|
39 |
- $e->getFile(), |
|
40 |
- $e->getLine(), |
|
41 |
- $e->getPrevious() |
|
42 |
- ); |
|
43 |
- |
|
44 |
- $this->setTrace($e->getTrace()); |
|
45 |
- } |
|
46 |
- |
|
47 |
- public function getOriginalClassName(): string |
|
48 |
- { |
|
49 |
- return $this->originalClassName; |
|
50 |
- } |
|
51 |
-} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,51 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/* |
|
4 |
+ * This file is part of the Symfony package. |
|
5 |
+ * |
|
6 |
+ * (c) Fabien Potencier <fabien@symfony.com> |
|
7 |
+ * |
|
8 |
+ * For the full copyright and license information, please view the LICENSE |
|
9 |
+ * file that was distributed with this source code. |
|
10 |
+ */ |
|
11 |
+ |
|
12 |
+namespace Symfony\Component\Debug\Exception; |
|
13 |
+ |
|
14 |
+/** |
|
15 |
+ * Fatal Throwable Error. |
|
16 |
+ * |
|
17 |
+ * @author Nicolas Grekas <p@tchwork.com> |
|
18 |
+ */ |
|
19 |
+class FatalThrowableError extends FatalErrorException |
|
20 |
+{ |
|
21 |
+ private $originalClassName; |
|
22 |
+ |
|
23 |
+ public function __construct(\Throwable $e) |
|
24 |
+ { |
|
25 |
+ $this->originalClassName = \get_class($e); |
|
26 |
+ |
|
27 |
+ if ($e instanceof \ParseError) { |
|
28 |
+ $severity = E_PARSE; |
|
29 |
+ } elseif ($e instanceof \TypeError) { |
|
30 |
+ $severity = E_RECOVERABLE_ERROR; |
|
31 |
+ } else { |
|
32 |
+ $severity = E_ERROR; |
|
33 |
+ } |
|
34 |
+ |
|
35 |
+ \ErrorException::__construct( |
|
36 |
+ $e->getMessage(), |
|
37 |
+ $e->getCode(), |
|
38 |
+ $severity, |
|
39 |
+ $e->getFile(), |
|
40 |
+ $e->getLine(), |
|
41 |
+ $e->getPrevious() |
|
42 |
+ ); |
|
43 |
+ |
|
44 |
+ $this->setTrace($e->getTrace()); |
|
45 |
+ } |
|
46 |
+ |
|
47 |
+ public function getOriginalClassName(): string |
|
48 |
+ { |
|
49 |
+ return $this->originalClassName; |
|
50 |
+ } |
|
51 |
+} |