Skip to content
This repository
Browse code

Default implementation of liftComet.lift_cometError.

The default implementation tries to log the exception and then rethrows
it. The log is guarded for the existence of console.error and logged as
an error.
  • Loading branch information...
commit bfdffdd2f80a4bc02d8462605a3793edae38df21 1 parent 391bfa6
Antonio Salazar Cardozo authored June 25, 2012
6  web/webkit/src/main/scala/net/liftweb/http/js/ScriptRenderer.scala
@@ -251,6 +251,12 @@ object ScriptRenderer {
251 251
         setTimeout("liftComet.lift_cometEntry();",""" + LiftRules.cometFailureRetryTimeout + """);
252 252
       },
253 253
 
  254
+      lift_cometError: function(e) {
  255
+        if (console && typeof console.error == 'function')
  256
+          console.error(e.stack || e);
  257
+        throw e;
  258
+      },
  259
+
254 260
       lift_cometEntry: function() {
255 261
         var isEmpty = function(){for (var i in lift_toWatch) {return false} return true}();
256 262
         if (!isEmpty) {

0 notes on commit bfdffdd

Please sign in to comment.
Something went wrong with that request. Please try again.