Skip to content

Commit ca0bd73

Browse files
committed
Add new Exception
1 parent c749d22 commit ca0bd73

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/**
4+
* Class BlunderErrorException
5+
*
6+
* Extends PHP's ErrorException with support for a custom "pretty" message,
7+
* and allows preserving original exception file and line information when
8+
* rethrowing exceptions with modified types.
9+
*
10+
* Useful for enhanced exception handling, presentation, and debugging
11+
* within the Blunder framework.
12+
*
13+
* @package MaplePHP\Blunder
14+
* @author Daniel Ronkainen
15+
* @license Apache-2.0 license, Copyright © Daniel Ronkainen
16+
* Don't delete this comment, it's part of the license.
17+
*/
18+
19+
namespace MaplePHP\Blunder\Exceptions;
20+
21+
use ErrorException;
22+
23+
final class BlunderSilentException extends ErrorException
24+
{
25+
}
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77

88
use MaplePHP\Blunder\Handlers\SilentHandler;
99
use MaplePHP\Blunder\Run;
10+
use MaplePHP\Unitary\Config\TestConfig;
1011
use MaplePHP\Unitary\Unit;
1112

13+
$config = TestConfig::make()->withName("blunder");
14+
$config = $config->withSubject("MaplePHP Blunder event test")->withSkip();
15+
1216
// If you add true to Unit it will run in quite mode
1317
// and only report if it finds any errors!
14-
15-
16-
group("MaplePHP Blunder event test", function ($inst) {
18+
group($config, function ($inst) {
1719

1820
// SilentHandler will hide the error that I have added in this file
1921
// and is using to test the Blunder library
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@
1212
use MaplePHP\Blunder\Handlers\TextHandler;
1313
use MaplePHP\Blunder\Handlers\XmlHandler;
1414
use MaplePHP\Blunder\Run;
15+
use MaplePHP\Unitary\Config\TestConfig;
1516
use MaplePHP\Unitary\Unit;
1617

1718

18-
group("MaplePHP Blunder handler test", function (\MaplePHP\Unitary\TestCase $inst) {
19+
$config = TestConfig::make()->withName("blunder");
20+
$config = $config->withSubject("MaplePHP Blunder handler test")->withSkip();
21+
22+
group($config, function (\MaplePHP\Unitary\TestCase $inst) {
1923

2024
// SilentHandler will hide the error that I have added in this file
2125
// and is using to test the Blunder library
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66

77
use MaplePHP\Blunder\Handlers\SilentHandler;
88
use MaplePHP\Blunder\Run;
9+
use MaplePHP\Unitary\Config\TestConfig;
910
use MaplePHP\Unitary\Unit;
1011

1112
// If you add true to Unit it will run in quite mode
1213
// and only report if it finds any errors!
1314

14-
group("MaplePHP Blunder redirect test", function ($inst) {
15+
$config = TestConfig::make()->withName("blunder");
16+
$config = $config->withSubject("MaplePHP Blunder redirect test")->withSkip();
17+
group($config, function ($inst) {
1518

1619
// SilentHandler will hide the error that I have added in this file
1720
// and is using to test the Blunder library

0 commit comments

Comments
 (0)