- return Util.substitute(
- matcher, new Perl5Compiler().compile(anExpression),
- new Perl5Substitution(aReplacement), anInput,
- Util.SUBSTITUTE_ALL);
- }
-
-
-
-}
+ try {
+ return Util.substitute(
+ matcher, new Perl5Compiler().compile(anExpression),
+ new Perl5Substitution(aReplacement), anInput,
+ Util.SUBSTITUTE_ALL);
+ }
+ catch (MalformedPatternException e) {
+ throw new UtilFailure(e);