Skip to content

Commit 0250106

Browse files
committed
#416: corrected Exception thowing
1 parent 1c3caf3 commit 0250106

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Drupal/TaxonomyTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public function taxonomyDeleteTerm(string $vocabulary_machine_name, string $term
267267
$term = reset($terms);
268268

269269
if (!$term) {
270-
throw new \Exception(sprintf('Unable to find the term "%s" in the vocabulary "%s".', $term_name, $vocabulary_machine_name));
270+
throw new \RuntimeException(sprintf('Unable to find the term "%s" in the vocabulary "%s".', $term_name, $vocabulary_machine_name));
271271
}
272272
$term->delete();
273273
}

0 commit comments

Comments
 (0)