Charles, When I took a closer look at this I became confused. The order of lines in the part of your message where you pasted in stack traces seems mangled, so I'm not sure I understand correctly exactly what error message you are getting. What is the exact error text and stack trace?
And you write, "But when in an extension I do the same with the .report method of a ReporterTask I get...", can you show me the exact code you wrote that produced that effect? Charles> So, how do I find out what exceptions are thrown by what Charles> classes/methods? I've not seen that information in the API Charles> documentation, and when I try to search the source code I come Charles> up empty. First a general answer: Scala doesn't have checked exceptions. Sometimes in parts of our Scala code that we expect will be called from Java, we add `@throws` annotations so that people using our APIs from Java will have the right information. But we haven't been rigorous about putting those annotations in every package (realistically, it would slow us down too much). You're much likelier to have accurate checked exception information when you're calling into the `api` package from Java, and less likely to get it when you're calling into internal packages like `nvm`. Is there a way for you to tell your Java compiler, "trust me, this method might throw checked exception X, even though it isn't declared to do so"? If not, and if you really need to catch undeclared checked exceptions, you might be forced to catch Exception and then do `instanceof` checks on the exceptions you get. But in your specific use case: It's possible this stuff about checked exceptions won't end up mattering once we've sorted out how to best accomplish what it is you're trying to accomplish. (It's also possible that I'll end up going in and adding some @throws annotations to `api.Task`, though that wouldn't help you until NetLogo 5.0.6 is released.) -- Seth Tisue | Northwestern University | http://tisue.net developer, NetLogo: http://ccl.northwestern.edu/netlogo/ -- You received this message because you are subscribed to the Google Groups "netlogo-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
