Show errors from completers, etc.
commit655cd766f8933abb682fa3f2fcfb582e1a5c1991
authorDavid Kettler <kettler@internode.on.net>
Thu, 7 May 2009 06:32:47 +0000 (7 16:02 +0930)
committerDavid Kettler <kettler@internode.on.net>
Wed, 18 Nov 2009 13:21:44 +0000 (18 23:51 +1030)
tree6ad3083bf62cb56e96a9fae05bebdae1c17cb956
parent1dc4a6e2964e4045c7f6cc9fcde84503f1b9466f
Show errors from completers, etc.

If an interactive_error was thrown in a minibuffer completer function,
the error was previously lost.  For complicated completers, for
instance when completions are dynamically loaded from a file, it is
useful for the user to see any error messages.  This commit ensures
that the error message is displayed briefly in the minibuffer.  The
user can continue with typing in the minibuffer as usual.

The problem arises because direct uses of co_call do not propagate
exceptions.  The same fix is applied to the two other places in
conkeror that could lose an error message.  One other place, in
download_helper.handle_show, already handled the problem in the same
way.
---

An alternative fix would be to provide an interactive_co_call to do
the wrappering.

The last time I submitted this, Jeremy commented that he had
"specifically intended that an exception being thrown would just
result in no completions being generated."  This patch displays an
error, but does not change the user interaction; no completions are
generated and the user is still in the minibuffer read.

http://thread.gmane.org/gmane.comp.mozilla.conkeror/1522/focus=1524
modules/download-manager.js
modules/help.js
modules/minibuffer-read.js