Commit 96ad78b2 authored by Romain Reuillon's avatar Romain Reuillon
Browse files

[Launcher] enh: improve error message

parent 937795c0
......@@ -142,7 +142,7 @@ public class Launcher {
Method runMethod = main.getDeclaredMethod("run", String[].class);
if(!java.lang.reflect.Modifier.isStatic(runMethod.getModifiers())) throw new RuntimeException("Run method should be static");
if(!int.class.isAssignableFrom(runMethod.getReturnType())) throw new RuntimeException("Run method should return int");
if(!int.class.isAssignableFrom(runMethod.getReturnType())) throw new RuntimeException("Run method " + runMethod + " returns " + runMethod.getReturnType() + ", it should return int");
ret = (int) runMethod.invoke(null, (Object) forwardAgs);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment