|
| 1 | +/* |
| 2 | + * Copyright 2002-2015 the original author or authors. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
1 | 17 | package org.springframework.scripting.groovy;
|
2 | 18 |
|
3 | 19 | import java.io.IOException;
|
4 | 20 | import java.util.Map;
|
5 | 21 |
|
6 | 22 | import groovy.lang.Binding;
|
| 23 | +import groovy.lang.GroovyRuntimeException; |
7 | 24 | import groovy.lang.GroovyShell;
|
8 |
| -import org.codehaus.groovy.control.CompilationFailedException; |
9 | 25 |
|
10 | 26 | import org.springframework.beans.factory.BeanClassLoaderAware;
|
11 | 27 | import org.springframework.scripting.ScriptCompilationException;
|
@@ -67,7 +83,7 @@ public Object evaluate(ScriptSource script, Map<String, Object> arguments) {
|
67 | 83 | catch (IOException ex) {
|
68 | 84 | throw new ScriptCompilationException(script, "Cannot access script", ex);
|
69 | 85 | }
|
70 |
| - catch (CompilationFailedException ex) { |
| 86 | + catch (GroovyRuntimeException ex) { |
71 | 87 | throw new ScriptCompilationException(script, "Evaluation failure", ex);
|
72 | 88 | }
|
73 | 89 | }
|
|
0 commit comments