提交 1d69354b 编写于 作者: S StephanEwen

Corrected error messages for PackagedProgram

上级 5d7a87d4
...@@ -276,16 +276,16 @@ public class PackagedProgram { ...@@ -276,16 +276,16 @@ public class PackagedProgram {
return Class.forName(className, true, cl).asSubclass(Program.class); return Class.forName(className, true, cl).asSubclass(Program.class);
} }
catch (ClassNotFoundException e) { catch (ClassNotFoundException e) {
throw new ProgramInvocationException("The pact plan assembler class '" + className throw new ProgramInvocationException("The program class '" + className
+ "' was not found in the jar file '" + jarFile.getPath() + "'.", e); + "' was not found in the jar file '" + jarFile.getPath() + "'.", e);
} }
catch (ClassCastException e) { catch (ClassCastException e) {
throw new ProgramInvocationException("The pact plan assembler class '" + className throw new ProgramInvocationException("The program class '" + className
+ "' cannot be cast to Program.", e); + "' cannot be cast to Program.", e);
} }
catch (Throwable t) { catch (Throwable t) {
throw new ProgramInvocationException("An unknown problem ocurred during the instantiation of the " throw new ProgramInvocationException("An unknown problem ocurred during the instantiation of the "
+ "program assembler: " + t, t); + "program: " + t, t);
} }
} }
...@@ -333,11 +333,11 @@ public class PackagedProgram { ...@@ -333,11 +333,11 @@ public class PackagedProgram {
try { try {
return clazz.newInstance(); return clazz.newInstance();
} catch (InstantiationException e) { } catch (InstantiationException e) {
throw new ProgramInvocationException("ERROR: The pact plan assembler class could not be instantiated. " throw new ProgramInvocationException("ERROR: The program class could not be instantiated. "
+ "Make sure that the class is a proper class (not abstract/interface) and has a " + "Make sure that the class is a proper class (not abstract/interface) and has a "
+ "public constructor with no arguments.", e); + "public constructor with no arguments.", e);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
throw new ProgramInvocationException("ERROR: The pact plan assembler class could not be instantiated. " throw new ProgramInvocationException("ERROR: The program class could not be instantiated. "
+ "Make sure that the class has a public constructor with no arguments.", e); + "Make sure that the class has a public constructor with no arguments.", e);
} catch (Throwable t) { } catch (Throwable t) {
throw new ProgramInvocationException("An error ocurred during the instantiation of the " throw new ProgramInvocationException("An error ocurred during the instantiation of the "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册