Re: Attempt for an UNO Undo API

Stephan Bergmann <[email protected]>
Newsgroups gmane.comp.openoffice.devel.api
Message-ID <[email protected]>
On 10/25/10 14:37, Frank Schönheit wrote:
> Anybody having an opinion on
> 1. whether XUndoManager.undo/redo, when invoked while an Undo context
>     is open, should
>     a. throw
>     b. silently and implicitly close all open contexts
>     c. ignore the call
>     d. other?
> 2. whether XUndoAction.undo/redo should be allowed to raise exceptions
>     (except the always-possible RuntimeException)?
> 3. how to deal with XUndoAction.undo/redo throwing an exception?
>     a. silence the error?
>     b. propagate the error to the caller of XUndoManager.undo/redo
>     c. clear the respective stack, since obviously the top action cannot
>        be invoked, thus the other actions, which may depend on the top
>        action, also can't
>     d. both b. and c.
>
> I tend to 1a., 2-yes, and 3d., but would appreciate any opinion on this.

IIUC, 1a means throwing for a temporary failure, so 3c appears to be too 
aggressive?

Also, question 2 should rather be "what exceptions exactly should be 
raised," right?

-Stephan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.