| 148 |
lars |
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\ErrorHandler\ErrorRenderer;
|
|
|
13 |
|
|
|
14 |
use Symfony\Component\ErrorHandler\Exception\FlattenException;
|
|
|
15 |
|
|
|
16 |
/**
|
|
|
17 |
* Formats an exception to be used as response content.
|
|
|
18 |
*
|
|
|
19 |
* @author Yonel Ceruto <yonelceruto@gmail.com>
|
|
|
20 |
*/
|
|
|
21 |
interface ErrorRendererInterface
|
|
|
22 |
{
|
|
|
23 |
public const IDE_LINK_FORMATS = [
|
|
|
24 |
'textmate' => 'txmt://open?url=file://%f&line=%l',
|
|
|
25 |
'macvim' => 'mvim://open?url=file://%f&line=%l',
|
|
|
26 |
'emacs' => 'emacs://open?url=file://%f&line=%l',
|
|
|
27 |
'sublime' => 'subl://open?url=file://%f&line=%l',
|
|
|
28 |
'phpstorm' => 'phpstorm://open?file=%f&line=%l',
|
|
|
29 |
'atom' => 'atom://core/open/file?filename=%f&line=%l',
|
|
|
30 |
'vscode' => 'vscode://file/%f:%l',
|
|
|
31 |
];
|
|
|
32 |
|
|
|
33 |
/**
|
|
|
34 |
* Renders a Throwable as a FlattenException.
|
|
|
35 |
*/
|
|
|
36 |
public function render(\Throwable $exception): FlattenException;
|
|
|
37 |
}
|