On Wed, Oct 14, 2009 at 3:31 PM, Laurent PETIT <[email protected]>wrote:
> Oh, and that's one of the main reasons why I think it's best to have our
> ccw compiler in a separate jvm : not unexpectedly crashing the host Eclipse
> if some code like this arises in user code or libraries imported by user
> code :-)
>>
>> public class Harmless {
>>> static {
>>> System.exit(42);
>>> }
>>> }
>>
>>
How about the compiler just loads classes in a SecurityManager context that
won't allow some naughtiness like System.exit()? Then you'd get a
CompilerException caused by ExceptionInInitializerError caused by
SecurityException rather than have your REPL, IDE, or whatever blow up from
code like the above. :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---