|
4 | 4 |
|
5 | 5 | namespace SimpleSAML\XML\Assert; |
6 | 6 |
|
7 | | -use Exception; |
8 | 7 | use SimpleSAML\Assert\Assert as BaseAssert; |
9 | 8 | use SimpleSAML\Assert\AssertionFailedException; |
10 | 9 | use SimpleSAML\XML\Constants as C; |
| 10 | +use SimpleSAML\XML\Exception\RuntimeException; |
11 | 11 |
|
12 | 12 | use function in_array; |
13 | 13 | use function preg_match_all; |
@@ -129,7 +129,7 @@ public static function validAllowedXPathFilter( |
129 | 129 | ); |
130 | 130 |
|
131 | 131 | if ($strippedValue === null) { |
132 | | - throw new Exception("Error in preg_replace."); |
| 132 | + throw new RuntimeException("Error in preg_replace."); |
133 | 133 | } |
134 | 134 |
|
135 | 135 | self::validAllowedXpathFunctions($strippedValue, $allowed_functions); |
@@ -157,7 +157,7 @@ public static function validAllowedXPathFunctions( |
157 | 157 | $matches = []; |
158 | 158 | $res = preg_match_all(self::$regex_xpfilter_functions, $value, $matches); |
159 | 159 | if ($res === false) { |
160 | | - throw new Exception("Error in preg_match_all."); |
| 160 | + throw new RuntimeException("Error in preg_match_all."); |
161 | 161 | } |
162 | 162 |
|
163 | 163 | // Check that all the function names we found are in the list of allowed function names |
@@ -192,7 +192,7 @@ public static function validAllowedXPathAxes( |
192 | 192 | $matches = []; |
193 | 193 | $res = preg_match_all(self::$regex_xpfilter_axes, $value, $matches); |
194 | 194 | if ($res === false) { |
195 | | - throw new Exception("Error in preg_match_all."); |
| 195 | + throw new RuntimeException("Error in preg_match_all."); |
196 | 196 | } |
197 | 197 |
|
198 | 198 | // Check that all the axes names we found are in the list of allowed axes names |
|
0 commit comments