summaryrefslogtreecommitdiff
path: root/lib/js/urweb.js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 10:31:11 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 10:31:11 -0400
commit471d135b67086298642e9bd26e0e380a605b7068 (patch)
tree5e1f870d80f1e625b95a2fae835753a0103a3285 /lib/js/urweb.js
parentb6163966d74b8f4636d63f28179205ed9f6daaaf (diff)
Improvements while working on Graftid
Diffstat (limited to 'lib/js/urweb.js')
-rw-r--r--lib/js/urweb.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 5482c2a5..2943c897 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -34,7 +34,9 @@ function pf() {
whine("Pattern match failure");
}
-function runHandlers(ls, arg) {
+function runHandlers(kind, ls, arg) {
+ if (ls == null)
+ alert(kind + ": " + arg);
for (; ls; ls = ls.next)
try {
ls.data(arg)(null);
@@ -48,7 +50,7 @@ function onError(f) {
}
function er(s) {
- runHandlers(errorHandlers, s);
+ runHandlers("Error", errorHandlers, s);
throw {uw_error: s};
}
@@ -61,7 +63,7 @@ function onFail(f) {
function doExn(v) {
if (v == null || v.uw_error == null) {
var s = (v == null ? "null" : v.toString());
- runHandlers(failHandlers, s);
+ runHandlers("Fail", failHandlers, s);
}
}
@@ -72,7 +74,7 @@ function onDisconnect(f) {
}
function discon() {
- runHandlers(disconnectHandlers, null);
+ runHandlers("Disconnect", disconnectHandlers, null);
}
var connectHandlers = null;
@@ -82,7 +84,7 @@ function onConnectFail(f) {
}
function conn() {
- runHandlers(connectHandlers, null);
+ runHandlers("Connect", connectHandlers, null);
}
var serverHandlers = null;
@@ -92,7 +94,7 @@ function onServerError(f) {
}
function servErr(s) {
- runHandlers(serverHandlers, s);
+ runHandlers("Server", serverHandlers, s);
}