Added the ErrorHandler notifications to all try-catch blocks

This commit is contained in:
Jonas Bonér 2011-03-02 00:14:45 +01:00
parent ce00125aba
commit 6f6d459dcd
17 changed files with 162 additions and 56 deletions

View file

@ -5,6 +5,7 @@
package akka.http
import akka.actor.{ActorRegistry, ActorRef, Actor}
import akka.actor.{ErrorHandler, ErrorHandlerEvent}
import javax.servlet.http.{HttpServletResponse, HttpServletRequest}
import javax.servlet.http.HttpServlet
@ -388,6 +389,7 @@ trait RequestMethod {
}
} catch {
case io =>
ErrorHandler notifyListeners ErrorHandlerEvent(io, this)
false
}
}
@ -405,7 +407,8 @@ trait RequestMethod {
pipe.complete
}
} catch {
case io: IOException => {}
case io: IOException =>
ErrorHandler notifyListeners ErrorHandlerEvent(io, this)
}
}

View file

@ -7,6 +7,7 @@ package akka.http
import javax.servlet. {AsyncContext, AsyncListener, AsyncEvent};
import Types._
import akka.actor.{ErrorHandler, ErrorHandlerEvent}
/**
* @author Garrick Evans
@ -35,6 +36,7 @@ trait Servlet30Context extends AsyncListener {
}
catch {
case ex: IllegalStateException =>
ErrorHandler notifyListeners ErrorHandlerEvent(ex, this)
false
}
}

View file

@ -23,6 +23,7 @@
package akka.security
import akka.actor.{Scheduler, Actor, ActorRef, ActorRegistry, IllegalActorStateException}
import akka.actor.{ErrorHandler, ErrorHandlerEvent}
import akka.actor.Actor._
import akka.config.Config
@ -368,6 +369,7 @@ trait SpnegoAuthenticationActor extends AuthenticationActor[SpnegoCredentials] {
Some(UserInfo(user, null, rolesFor(user)))
} catch {
case e: PrivilegedActionException => {
ErrorHandler notifyListeners ErrorHandlerEvent(e, this)
return None
}
}