8000 Merge pull request #1918 from lift/ajk-log-exceptions · lift/framework@aa24c2d · GitHub
[go: up one dir, main page]

Skip to content

Commit aa24c2d

Browse files
Merge pull request #1918 from lift/ajk-log-exceptions
Log exceptions too when logging errors
2 parents c97b7ea + 7bea36b commit aa24c2d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

core/util/src/main/scala/net/liftweb/util/Schedule.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ sealed trait Schedule extends Loggable {
151151
try {
152152
f.apply()
153153
} catch {
154-
case e: Exception => logger.error(e)
154+
case e: Exception => logger.error(e.getMessage, e)
155155
}
156156
}
157157
}
@@ -162,7 +162,7 @@ sealed trait Schedule extends Loggable {
162162
Schedule.this.restart
163163
pool.execute(r)
164164
} catch {
165-
case e: Exception => logger.error(e)
165+
case e: Exception => logger.error(e.getMessage, e)
166166
}
167167
}
168168
}

web/webkit/src/main/scala/net/liftweb/builtin/snippet/Embed.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ object Embed extends DispatchSnippet {
7979

8080
bindFn(template)
8181
}
82+
case Failure(msg, Full(ex), _) =>
83+
logger.error("'embed' snippet failed with message: "+msg, ex)
84+
throw new SnippetExecutionException("Embed Snippet failed: "+msg)
85+
8286
case Failure(msg, _, _) =>
8387
logger.error("'embed' snippet failed with message: "+msg)
8488
throw new SnippetExecutionException("Embed Snippet failed: "+msg)

web/webkit/src/main/scala/net/liftweb/http/LiftSession.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,6 +2106,7 @@ class LiftSession(private[http] val _contextPath: String, val underlyingId: Stri
21062106
in.!(xlate(p) match {
21072107
case Full(v) => v
21082108
case Empty => logger.error("Failed to deserialize JSON message "+p); p
2109+
case Failure(msg, Full(ex), _) => logger.error("Failed to deserialize JSON message "+p+". Error "+msg, ex); p
21092110
case Failure(msg, _, _) => logger.error("Failed to deserialize JSON message "+p+". Error "+msg); p
21102111
})
21112112
JsCmds.Noop

0 commit comments

Comments
 (0)
0