Lot of people wonder what the famous Unhandled event loop exception is !!!???
This is no more than an uncaught
Exception occurring with in the Eclipse workbench Main thread (or the UI thread, it’s the same).
When writing Eclipse plugins we often write code that will be executed within the Main thread. For example when contributing a new hello world button within the main Eclipse toolbar we must implement a given interface with a
In this method we write the code responsible to display to the user the “Hello world message”. If this code throws a new
Exception without catching it then the
Exception is forwarded to the caller. This caller is the Eclipse code but not our !!!!
In this Eclipse code the
Exception is forwarded up to the
Workbench.runEventLoop(IExceptionHandler, Display) method that catch it and log a new Unhandled event loop exception Error message. This message also contains our source
Exception displayed as Reason :
When you see an Unhandled event loop exception , don’t worry and just look for the reason, it’s often a silly mistake :o)