Browse files

Made exceptionHandler work correctly

  • Loading branch information...
1 parent da52cb1 commit 57b930d1ad8953e3badebbffbe07e0d94b1d46f4 @dpp dpp committed Jan 29, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 web/webkit/src/main/scala/net/liftweb/http/CometActor.scala
View
4 web/webkit/src/main/scala/net/liftweb/http/CometActor.scala
@@ -757,6 +757,7 @@ trait CometActor extends LiftActor with LiftCometActor with BindHelpers {
try {
what.apply(in)
} catch {
+ case e if exceptionHandler.isDefinedAt(e) => exceptionHandler(e)
case e: Exception => reportError("Message dispatch for " + in, e)
}
if (S.functionMap.size > 0) {
@@ -777,6 +778,7 @@ trait CometActor extends LiftActor with LiftCometActor with BindHelpers {
try {
what.isDefinedAt(in)
} catch {
+ case e if exceptionHandler.isDefinedAt(e) => exceptionHandler(e); false
case e: Exception => reportError("Message test for " + in, e); false
}
}
@@ -914,6 +916,7 @@ trait CometActor extends LiftActor with LiftCometActor with BindHelpers {
try {
performReRender(false)
} catch {
+ case e if exceptionHandler.isDefinedAt(e) => exceptionHandler(e)
case e: Exception => reportError("Failed performReRender", e)
}
@@ -937,6 +940,7 @@ trait CometActor extends LiftActor with LiftCometActor with BindHelpers {
f => try {
List(f())
} catch {
+ case e if exceptionHandler.isDefinedAt(e) => exceptionHandler(e); Nil
case e: Exception => reportError("Ajax function dispatch", e); Nil
}
}

0 comments on commit 57b930d

Please sign in to comment.