Try this:
Example.fan
C:\> fan Example.fan
ERROR: cannot compile script sys::NullErr: java.lang.NullPointerException fan.sys.Pod.load (Pod.java:403) fan.sys.Pod.<init> (Pod.java:217) fan.sys.Pod.load (Pod.java:130) compiler::LoadPod.load (LoadPod.fan:53) compiler::GenerateOutput.run (GenerateOutput.fan:43) compiler::Compiler.backend (Compiler.fan:115) compiler::Compiler.compile (Compiler.fan:67) compiler::Main.compileScript (Main.fan:52) java.lang.reflect.Method.invoke (Method.java:597) fan.sys.Method.invoke (Method.java:559) fan.sys.Method$MethodFunc.call (Method.java:297) fan.sys.Method.call (Method.java:143) fanx.util.EnvScripts.compile (EnvScripts.java:87) fanx.util.EnvScripts.compile (EnvScripts.java:45) fan.sys.Env.compileScript (Env.java:139) fanx.tools.Fan.compileScript (Fan.java:112) fanx.tools.Fan.executeFile (Fan.java:79) fanx.tools.Fan.execute (Fan.java:37) fanx.tools.Fan.run (Fan.java:298) fanx.tools.Fan.main (Fan.java:336)
While technically, yes the error msg is correct, I think the stacktrace and NullPointerException is a bit misleading and could be handled better.
NullPointerException
Thanks for reporting that, I pushed a fix
Login or Signup to reply.
SlimerDude Thu 9 Jul 2015
Try this:
Example.fan
.C:\> fan Example.fan
While technically, yes the error msg is correct, I think the stacktrace and
NullPointerException
is a bit misleading and could be handled better.brian Fri 10 Jul 2015
Thanks for reporting that, I pushed a fix