Skip to content

Commit 410d1ce

Browse files
committed
Fix raised exception
1 parent 4efe2ab commit 410d1ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Assert/XPathFilterTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Exception;
88
use InvalidArgumentException;
99
use SimpleSAML\Assert\Assert as BaseAssert;
10+
use SimpleSAML\Assert\AssertionFailedException;
1011
use SimpleSAML\XML\Constants as C;
1112

1213
use function in_array;
@@ -171,7 +172,7 @@ public static function allowedXPathFilter(
171172
// Check that all the axes names we found are in the list of allowed axes names
172173
foreach ($matches[1] as $match) {
173174
if (!in_array($match, $allowed_axes)) {
174-
throw new InvalidArgumentException(sprintf(
175+
throw new AssertionFailedException(sprintf(
175176
$message ?: '\'%s\' is not an allowed XPath axis.',
176177
$match,
177178
));

0 commit comments

Comments
 (0)