Skip to content

Commit

Permalink
Use NonFatal
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonwang committed Dec 17, 2015
1 parent a7721af commit e926120
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import java.util.NoSuchElementException
import java.util.zip.ZipOutputStream
import javax.servlet.http.{HttpServlet, HttpServletRequest, HttpServletResponse}

import scala.util.control.NonFatal

import com.google.common.cache._
import org.eclipse.jetty.servlet.{ServletContextHandler, ServletHolder}

Expand Down Expand Up @@ -119,7 +121,7 @@ class HistoryServer(
val ui = appCache.get(appKey)
Some(ui)
} catch {
case e: Exception => e.getCause() match {
case NonFatal(e) => e.getCause() match {
case nsee: NoSuchElementException =>
None

Expand Down Expand Up @@ -205,7 +207,7 @@ class HistoryServer(
appCache.get(appId + attemptId.map { id => s"/$id" }.getOrElse(""))
true
} catch {
case e: Exception => e.getCause() match {
case NonFatal(e) => e.getCause() match {
case nsee: NoSuchElementException =>
false

Expand Down

0 comments on commit e926120

Please sign in to comment.