comparison doc/manual.tex @ 1770:53d56d87fbd2

More manual detail on registering error handlers
author Adam Chlipala <adam@chlipala.net>
date Sat, 19 May 2012 11:38:14 -0400
parents be114e170b77
children 6bc2a8cb3a67
comparison
equal deleted inserted replaced
1769:b042c50de57c 1770:53d56d87fbd2
2014 The current thread can be paused for at least a specified number of milliseconds. 2014 The current thread can be paused for at least a specified number of milliseconds.
2015 $$\begin{array}{l} 2015 $$\begin{array}{l}
2016 \mt{val} \; \mt{sleep} : \mt{int} \to \mt{transaction} \; \mt{unit} 2016 \mt{val} \; \mt{sleep} : \mt{int} \to \mt{transaction} \; \mt{unit}
2017 \end{array}$$ 2017 \end{array}$$
2018 2018
2019 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. 2019 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.
2020 $$\begin{array}{l} 2020 $$\begin{array}{l}
2021 \mt{val} \; \mt{onError} : (\mt{xbody} \to \mt{transaction} \; \mt{unit}) \to \mt{transaction} \; \mt{unit} \\ 2021 \mt{val} \; \mt{onError} : (\mt{xbody} \to \mt{transaction} \; \mt{unit}) \to \mt{transaction} \; \mt{unit} \\
2022 \mt{val} \; \mt{onFail} : (\mt{string} \to \mt{transaction} \; \mt{unit}) \to \mt{transaction} \; \mt{unit} \\ 2022 \mt{val} \; \mt{onFail} : (\mt{string} \to \mt{transaction} \; \mt{unit}) \to \mt{transaction} \; \mt{unit} \\
2023 \mt{val} \; \mt{onConnectFail} : \mt{transaction} \; \mt{unit} \to \mt{transaction} \; \mt{unit} \\ 2023 \mt{val} \; \mt{onConnectFail} : \mt{transaction} \; \mt{unit} \to \mt{transaction} \; \mt{unit} \\
2024 \mt{val} \; \mt{onDisconnect} : \mt{transaction} \; \mt{unit} \to \mt{transaction} \; \mt{unit} \\ 2024 \mt{val} \; \mt{onDisconnect} : \mt{transaction} \; \mt{unit} \to \mt{transaction} \; \mt{unit} \\