# HG changeset patch # User Adam Chlipala # Date 1337441894 14400 # Node ID 53d56d87fbd21e07fcc757a40279be346af89e2e # Parent b042c50de57c681fe1b343d989082b422f881d4d More manual detail on registering error handlers diff -r b042c50de57c -r 53d56d87fbd2 doc/manual.tex --- a/doc/manual.tex Sat May 19 11:32:24 2012 -0400 +++ b/doc/manual.tex Sat May 19 11:38:14 2012 -0400 @@ -2016,7 +2016,7 @@ \mt{val} \; \mt{sleep} : \mt{int} \to \mt{transaction} \; \mt{unit} \end{array}$$ -A few functions are available to registers callbacks for particular error events. Respectively, they are triggered on calls to $\mt{error}$, uncaught JavaScript exceptions, failure of remote procedure calls, the severance of the connection serving asynchronous messages, or the occurrence of some other error with that connection. If no handlers are registered for a kind of error, then occurrences of that error are ignored silently. +A few functions are available to registers callbacks for particular error events. Respectively, they are triggered on calls to $\mt{error}$, uncaught JavaScript exceptions, failure of remote procedure calls, the severance of the connection serving asynchronous messages, or the occurrence of some other error with that connection. If no handlers are registered for a kind of error, then a JavaScript \cd{alert()} is used to announce its occurrence. When one of these functions is called multiple times within a single page, all registered handlers are run when appropriate events occur, with handlers run in the reverse of their registration order. $$\begin{array}{l} \mt{val} \; \mt{onError} : (\mt{xbody} \to \mt{transaction} \; \mt{unit}) \to \mt{transaction} \; \mt{unit} \\ \mt{val} \; \mt{onFail} : (\mt{string} \to \mt{transaction} \; \mt{unit}) \to \mt{transaction} \; \mt{unit} \\