PluginProbe
UpStream: a Project Management Plugin for WordPress / trunk
UpStream: a Project Management Plugin for WordPress vtrunk
trunk 1.39.0 1.39.1 1.39.2 1.39.3 2.0.7 2.1.0
upstream / vendor / symfony / debug / Tests / Fixtures / ToStringThrower.php

ToStringThrower.php in UpStream: a Project Management Plugin for WordPress trunk, at vendor/symfony/debug/Tests/Fixtures/ToStringThrower.php

25 lines 544 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Symfony\Component\Debug\Tests\Fixtures;
4
5 class ToStringThrower
6 {
7 private $exception;
8
9 public function __construct(\Exception $e)
10 {
11 $this->exception = $e;
12 }
13
14 public function __toString()
15 {
16 try {
17 throw $this->exception;
18 } catch (\Exception $e) {
19 // Using user_error() here is on purpose so we do not forget
20 // that this alias also should work alongside with trigger_error().
21 return trigger_error($e, E_USER_ERROR);
22 }
23 }
24 }
25