Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » AssertionFailedException
AssertionFailedException [message #328969] Mon, 09 June 2008 11:55 Go to next message
Eclipse UserFriend
Originally posted by: no.body.no.spam.org

I want an Eclipse application to shutdown gracefully if an
AssertionFailedException has been thrown. Is there a central
catch clause where I can register a shutdown method? Thanks
for your hints.

--
Gruesse/Regards,

Peter Maas, Aachen
E-mail "cC5tYWFzQG1hZ21hc29mdC5kZQ==\n".decode("base64")
Re: AssertionFailedException [message #328993 is a reply to message #328969] Tue, 10 June 2008 03:13 Go to previous message
Eclipse UserFriend
Originally posted by: no.body.no.spam.org

Peter Maas schrieb:
> I want an Eclipse application to shutdown gracefully if an
> AssertionFailedException has been thrown. Is there a central
> catch clause where I can register a shutdown method? Thanks
> for your hints.

My solution:

Override WorkbenchAdvisor.eventLoopException(Throwable) by
first calling super.eventLoopException(Throwable) and then
java.lang.Runtime.getRuntime().halt(int) if Throwable type
is AssertionFailedException. PlatformUI.getWorkbench().close()
would give the user a chance to save data - and perhaps corrupt
them.

--
Gruesse/Regards,

Peter Maas, Aachen
E-mail "cC5tYWFzQG1hZ21hc29mdC5kZQ==\n".decode("base64")
Previous Topic:How to navigate from StyledText to IEditorPart
Next Topic:Make TableLayoutComposite public
Goto Forum:
  


Current Time: Sat May 10 10:19:32 EDT 2025

Powered by FUDForum. Page generated in 0.03663 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top