File tree 5 files changed +11
-11
lines changed
5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace ipl \Html ;
4
4
5
- use Exception ;
5
+ use Throwable ;
6
6
7
7
/**
8
8
* Text node where content creation is deferred until rendering
@@ -96,7 +96,7 @@ public function __toString()
96
96
{
97
97
try {
98
98
return $ this ->render ();
99
- } catch (Exception $ e ) {
99
+ } catch (Throwable $ e ) {
100
100
return Error::render ($ e );
101
101
}
102
102
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace ipl \Html ;
4
4
5
- use Exception ;
6
5
use ipl \Html \Contract \FormElement ;
7
6
use ipl \Html \Contract \FormSubmitElement ;
8
7
use ipl \Html \FormElement \FormElements ;
9
8
use ipl \Stdlib \Messages ;
10
9
use Psr \Http \Message \ServerRequestInterface ;
10
+ use Throwable ;
11
11
12
12
class Form extends BaseHtmlElement
13
13
{
@@ -237,7 +237,7 @@ public function handleRequest(ServerRequestInterface $request)
237
237
$ this ->emit (Form::ON_SENT , [$ this ]);
238
238
$ this ->onSuccess ();
239
239
$ this ->emitOnce (Form::ON_SUCCESS , [$ this ]);
240
- } catch (Exception $ e ) {
240
+ } catch (Throwable $ e ) {
241
241
$ this ->addMessage ($ e );
242
242
$ this ->onError ();
243
243
$ this ->emit (Form::ON_ERROR , [$ e , $ this ]);
@@ -363,7 +363,7 @@ protected function onError()
363
363
{
364
364
$ errors = Html::tag ('ul ' , ['class ' => 'errors ' ]);
365
365
foreach ($ this ->getMessages () as $ message ) {
366
- if ($ message instanceof Exception ) {
366
+ if ($ message instanceof Throwable ) {
367
367
$ message = $ message ->getMessage ();
368
368
}
369
369
Original file line number Diff line number Diff line change 2
2
3
3
namespace ipl \Html ;
4
4
5
- use Exception ;
6
5
use InvalidArgumentException ;
6
+ use Throwable ;
7
7
8
8
use function ipl \Stdlib \get_php_type ;
9
9
@@ -86,7 +86,7 @@ public function __toString()
86
86
{
87
87
try {
88
88
return $ this ->render ();
89
- } catch (Exception $ e ) {
89
+ } catch (Throwable $ e ) {
90
90
return Error::render ($ e );
91
91
}
92
92
}
Original file line number Diff line number Diff line change 3
3
namespace ipl \Html ;
4
4
5
5
use Countable ;
6
- use Exception ;
7
6
use InvalidArgumentException ;
8
7
use ipl \Html \Contract \Wrappable ;
9
8
use ipl \Stdlib \Events ;
10
9
use RuntimeException ;
10
+ use Throwable ;
11
11
12
12
/**
13
13
* HTML document
@@ -418,7 +418,7 @@ public function __toString()
418
418
{
419
419
try {
420
420
return $ this ->render ();
421
- } catch (Exception $ e ) {
421
+ } catch (Throwable $ e ) {
422
422
return Error::render ($ e );
423
423
}
424
424
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace ipl \Html ;
4
4
5
- use Exception ;
5
+ use Throwable ;
6
6
7
7
/**
8
8
* A text node
@@ -100,7 +100,7 @@ public function __toString()
100
100
{
101
101
try {
102
102
return $ this ->render ();
103
- } catch (Exception $ e ) {
103
+ } catch (Throwable $ e ) {
104
104
return Error::render ($ e );
105
105
}
106
106
}
You can’t perform that action at this time.
0 commit comments