This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.scripting.java-1.0.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-java.git
commit e815996da4fb3329d20f744b6adccf6e5329ec2f Author: Carsten Ziegeler <[email protected]> AuthorDate: Tue Jul 7 09:13:36 2009 +0000 Improve exception messages. git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/scripting/java@791764 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/sling/scripting/java/CompilationContext.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/sling/scripting/java/CompilationContext.java b/src/main/java/org/apache/sling/scripting/java/CompilationContext.java index 8c5e41b..2de7af7 100644 --- a/src/main/java/org/apache/sling/scripting/java/CompilationContext.java +++ b/src/main/java/org/apache/sling/scripting/java/CompilationContext.java @@ -196,12 +196,13 @@ public class CompilationContext { */ public Class load() throws ServletException, FileNotFoundException { + final String name = this.getClassFilePath().substring(1).replace('/', '.'); try { - servletClass = this.options.getClassLoader().loadClass(this.getClassFilePath().substring(1).replace('/', '.')); + servletClass = this.options.getClassLoader().loadClass(name); } catch (ClassNotFoundException cex) { - throw new ServletException("Unable to load servlet class.", cex); + throw new ServletException("Servlet class not found: " + name, cex); } catch (Exception ex) { - throw new ServletException("Unable to compile servlet.", ex); + throw new ServletException("Unable to compile servlet: " + name, ex); } removed = 0; return servletClass; -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
