1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Throws; |
6
|
|
|
|
7
|
|
|
use Throwable; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* @param Throwable $exception |
11
|
|
|
* |
12
|
|
|
* @throws Throwable |
13
|
|
|
*/ |
14
|
|
|
function thr(Throwable $exception) |
15
|
|
|
{ |
16
|
12 |
|
return Helper::thr($exception); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
function thrException(...$args) |
20
|
|
|
{ |
21
|
6 |
|
return Helper::thrException(...$args); |
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
function thrBadFunctionCallException(...$args) |
25
|
|
|
{ |
26
|
3 |
|
return Helper::thrBadFunctionCallException(...$args); |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
function thrBadMethodCallException(...$args) |
30
|
|
|
{ |
31
|
3 |
|
return Helper::thrBadMethodCallException(...$args); |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
function thrDomainException(...$args) |
35
|
|
|
{ |
36
|
3 |
|
return Helper::thrDomainException(...$args); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
function thrInvalidArgumentException(...$args) |
40
|
|
|
{ |
41
|
3 |
|
return Helper::thrInvalidArgumentException(...$args); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
function thrLengthException(...$args) |
45
|
|
|
{ |
46
|
3 |
|
return Helper::thrLengthException(...$args); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
function thrLogicException(...$args) |
50
|
|
|
{ |
51
|
3 |
|
return Helper::thrLogicException(...$args); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
function thrOutOfBoundsException(...$args) |
55
|
|
|
{ |
56
|
3 |
|
return Helper::thrOutOfBoundsException(...$args); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
function thrOutOfRangeException(...$args) |
60
|
|
|
{ |
61
|
3 |
|
return Helper::thrOutOfRangeException(...$args); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
function thrOverflowException(...$args) |
65
|
|
|
{ |
66
|
3 |
|
return Helper::thrOverflowException(...$args); |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
function thrRangeException(...$args) |
70
|
|
|
{ |
71
|
3 |
|
return Helper::thrRangeException(...$args); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
function thrRuntimeException(...$args) |
75
|
|
|
{ |
76
|
3 |
|
return Helper::thrRuntimeException(...$args); |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
function thrUnderflowException(...$args) |
80
|
|
|
{ |
81
|
3 |
|
return Helper::thrUnderflowException(...$args); |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
function thrUnexpectedValueException(...$args) |
85
|
|
|
{ |
86
|
3 |
|
return Helper::thrUnexpectedValueException(...$args); |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
function thrErrorException(...$args) |
90
|
|
|
{ |
91
|
3 |
|
return Helper::thrErrorException(...$args); |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
function thrError(...$args) |
95
|
|
|
{ |
96
|
3 |
|
return Helper::thrError(...$args); |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
function thrArgumentCountError(...$args) |
100
|
|
|
{ |
101
|
3 |
|
return Helper::thrArgumentCountError(...$args); |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
function thrArithmeticError(...$args) |
105
|
|
|
{ |
106
|
3 |
|
return Helper::thrArithmeticError(...$args); |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
function thrAssertionError(...$args) |
110
|
|
|
{ |
111
|
3 |
|
return Helper::thrAssertionError(...$args); |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
function thrDivisionByZeroError(...$args) |
115
|
|
|
{ |
116
|
3 |
|
return Helper::thrDivisionByZeroError(...$args); |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
function thrCompileError(...$args) |
120
|
|
|
{ |
121
|
3 |
|
return Helper::thrCompileError(...$args); |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
function thrParseError(...$args) |
125
|
|
|
{ |
126
|
3 |
|
return Helper::thrParseError(...$args); |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
function thrTypeError(...$args) |
130
|
|
|
{ |
131
|
3 |
|
return Helper::thrTypeError(...$args); |
132
|
|
|
} |
133
|
|
|
|