Skip to content

Commit

Permalink
Merge pull request #1918 from lift/ajk-log-exceptions
Browse files Browse the repository at this point in the history
Log exceptions too when logging errors
  • Loading branch information
farmdawgnation authored Sep 15, 2017
2 parents c97b7ea + 7bea36b commit aa24c2d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/util/src/main/scala/net/liftweb/util/Schedule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ sealed trait Schedule extends Loggable {
try {
f.apply()
} catch {
case e: Exception => logger.error(e)
case e: Exception => logger.error(e.getMessage, e)
}
}
}
Expand All @@ -162,7 +162,7 @@ sealed trait Schedule extends Loggable {
Schedule.this.restart
pool.execute(r)
} catch {
case e: Exception => logger.error(e)
case e: Exception => logger.error(e.getMessage, e)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ object Embed extends DispatchSnippet {

bindFn(template)
}
case Failure(msg, Full(ex), _) =>
logger.error("'embed' snippet failed with message: "+msg, ex)
throw new SnippetExecutionException("Embed Snippet failed: "+msg)

case Failure(msg, _, _) =>
logger.error("'embed' snippet failed with message: "+msg)
throw new SnippetExecutionException("Embed Snippet failed: "+msg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2106,6 +2106,7 @@ class LiftSession(private[http] val _contextPath: String, val underlyingId: Stri
in.!(xlate(p) match {
case Full(v) => v
case Empty => logger.error("Failed to deserialize JSON message "+p); p
case Failure(msg, Full(ex), _) => logger.error("Failed to deserialize JSON message "+p+". Error "+msg, ex); p
case Failure(msg, _, _) => logger.error("Failed to deserialize JSON message "+p+". Error "+msg); p
})
JsCmds.Noop
Expand Down

0 comments on commit aa24c2d

Please sign in to comment.