This is making development tougher than it needs to be, but I'll also need to think about what to do later, when I want to give sensible error messages to the end-user too...
Thanks in advance for any help!
Here's an example stack trace:
> java.lang.ClassNotFoundException: Main (args = , classpath = /var/folders/Dv/DvlT4ws6FkiBGx0tgaexok+++TI/-Tmp-/scalascript2075965475272034645.tmp:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar:/opt/local/share/scala-2.9/lib/jline.jar:/opt/local/share/scala-2.9/lib/scala-compiler.jar:/opt/local/share/scala-2.9/lib/scala-dbc.jar:/opt/local/share/scala-2.9/lib/scala-library.jar:/opt/local/share/scala-2.9/lib/scala-swing.jar:/opt/local/share/scala-2.9/lib/scalap.jar:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/Users/paul/scala/foo/.:/Users/paul/scala/foo/../borachio/library/target/scala_2.9.0/library_2.9.0-1.1.jar)
> at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:103)
> at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:33)
> at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:40)
> at scala.tools.nsc.ScriptRunner.scala$tools$nsc$ScriptRunner$$runCompiled(ScriptRunner.scala:180)
> at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:197)
> at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:197)
> at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1$$anonfun$apply$mcZ$sp$1.apply(ScriptRunner.scala:166)
> at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1$$anonfun$apply$mcZ$sp$1.apply(ScriptRunner.scala:166)
> at scala.Option.exists(Option.scala:188)
> at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply$mcZ$sp(ScriptRunner.scala:166)
> at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:140)
> at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:140)
> at scala.tools.nsc.util.package$.waitingForThreads(package.scala:26)
> at scala.tools.nsc.ScriptRunner.withCompiledScript(ScriptRunner.scala:139)
> at scala.tools.nsc.ScriptRunner.runScript(ScriptRunner.scala:197)
> at scala.tools.nsc.ScriptRunner.runScriptAndCatch(ScriptRunner.scala:210)
> at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:58)
> at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:80)
> at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:89)
> at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
>
--
paul.butcher->msgCount++
Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?
http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: pa...@paulbutcher.com
AIM: paulrabutcher
Skype: paulrabutcher
Thanks!
I'd really appreciate some help with this? There must be a "right" way to report errors from a plugin? If there's an example or any documentation I should look at, I'd greatly appreciate a pointer...
I'm not doing anything at all clever. I have a compiler plugin which runs fine and does exactly what I hope it should. But if it ever throws an exception, I get the (very confusing!) stack trace I attached in an earlier message.
I'll see if I can put together a small example to demonstrate the problem so that others can reproduce it.