|When do I use ExecutionException [message #223639]
||Fri, 07 November 2008 13:00
| Danail Branekov
Registered: July 2009
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.
Powered by FUDForum
. Page generated in 0.01874 seconds