Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
11 | 1 | public function __invoke(\V8JsScriptException $e) : string |
|
12 | { |
||
13 | 1 | $erroCode = mb_strimwidth($e->getJsSourceLine(), $e->getJsStartColumn(), 240, '...'); |
|
14 | 1 | $errorMsg = sprintf( |
|
15 | 1 | "%s\n%s\nJS Stack trace:\n%s", |
|
16 | 1 | $e->getMessage(), |
|
17 | $erroCode, |
||
18 | 1 | $e->getJsTrace() |
|
19 | ); |
||
20 | 1 | throw new \V8JsScriptException($errorMsg); |
|
21 | } |
||
22 | } |
||
23 |