[josm-dev] [PATCH 04/26] make Commands able to fail

Dave Hansen dave at sr71.net
Tue Apr 29 15:31:00 BST 2008


On Tue, 2008-04-29 at 15:28 +0200, Frederik Ramm wrote:
> In understanding, a command can only fail if there's a programming  
> error in JOSM. Even so it is, of course, a good thing to handle that  
> gracefully rather than just throw an exception. - But are your  
> patches introducing commands that may fail for other reasons than  
> programming errors?

No, it's pretty much there for programming errors these days.

The original idea was to let ChangeCommand fail.  I've since moved on
from that, since I'm ripping out ChangeCommand completely. 

I have seen it pay off a few times avoiding those programming errors.
SequenceCommands can get you into a whole load of trouble and cause some
weird inconsistencies if an early command executes and later ones do
not.

-- Dave





More information about the josm-dev mailing list