Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » When do I use ExecutionException
When do I use ExecutionException [message #223639] Fri, 07 November 2008 08:00
Danail Branekov is currently offline Danail Branekov
Messages: 2
Registered: July 2009
Junior Member
Hi,

Does anyone know when
org.eclipse.core.commands.operations.IUndoableOperation.exec ute() should
throw an exception and when should return an error status?

According to the "execute" method javadoc, an error status is returned
when the command execution was not successful. An exception is thrown when
an exception occured during execution. Where is the difference?
Generally, someone would know that there is a problem whenever an
exception is thrown. Internal checks are usually done by assertions, or
the code simply relying that everything is fine. If a problem occurs, a
runtime exception would be thrown. This is pretty fine as one's coding is
obviously unable to deal with the "runtime issue" (i.e. it needs to be
handled by some caller) or there is simply programatic error (a.k.a.
"bug") which needs to be fixed.

I would appreciate your comments.

Regards, Danail
Previous Topic:tag selection for copy/cut
Next Topic:Re: Unwanted XML warnings
Goto Forum:
  


Current Time: Wed Aug 20 04:55:08 EDT 2014

Powered by FUDForum. Page generated in 0.02148 seconds