Thursday 15 January 2015

swing - How to get Clojure exception notification when they happen on the EDT? -


I've just been scratching my hair for a long time so I could not find it. This became an exception exception, but apparently because it happened on ADT, I could not "see" it. When run from the terminal it was not shown in the "Lean Run" terminal and when running from AMCS, it was not shown in any AMACS buffer.

After a very long time I ended up doing this:

  (try (function-call-in-error-error ...) (Exception e (Printen e)   

And finally, thanks, I have been printed it:

  # & lt; ArityException clojure.lang.ArityException: incorrect The numbers were passed ...   

and so I can find my error.

And if I do this:

  (do not println "try ...") (arity-   

then the terminal print "trying ..." But never goes to "done ..." .

I tried to set a default exception exception handler: The exception is not being caught, such a program or EDT Hrithik was "stuck" after the exception (without printing anything).

How can I deal with this next time? Because I could not find any message anywhere because I took a long time to find out Once again: nothing in 'Lean Run' terminal and in any AMACS buffer Nothing.

What I should be made a function that should call for the catch / hold manually EDT and then log / Printlain exception?

Also note that this is a relatively "long" closure app: 1000 lines of code, so I can not paste it here and I do not reproduce that behavior in a small instance Could (but it is consistent in my app)

You can register an ineligible exception handler with a thread so that you can have all the eDT No need to wrap the calls.

  • Trying to enter one with the EDT and seeing that it gives you the desired behavior.

No comments:

Post a Comment