diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-05-14 10:31:11 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-05-14 10:31:11 -0400 |
commit | b6c1b15d74dcf84fdb174eecc31cdf64a98f07a3 (patch) | |
tree | 5e1f870d80f1e625b95a2fae835753a0103a3285 /lib | |
parent | 29f71e629bfe700a4bfcc7d2018bdab305d6fc3e (diff) |
Improvements while working on Graftid
Diffstat (limited to 'lib')
-rw-r--r-- | lib/js/urweb.js | 14 |
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); } |