+DEP_UI.debug = function(msg) {
+ /* Write the string MSG to the `trace' element, if there is one. */
+
+ var e = elt('trace');
+ if (e !== null) e.textContent += msg;
+}
+
+ DEP_UI.trap = function(what, func) {
+ try {
+ func();
+ } catch (e) {
+ debug('caught exception in ' + what + ': ' + e);
+ throw e;
+ }
+}
+