Skip to content

Commit

Permalink
when exception is thrown inside retrieve let's log it in details
Browse files Browse the repository at this point in the history
  • Loading branch information
neowit committed Jun 16, 2017
1 parent dcbc258 commit b8ef508
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/scala/com/neowit/apex/actions/RetrieveMetadata.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package com.neowit.apex.actions

import java.io.{File, FileOutputStream}
import java.io.{File, FileOutputStream, PrintWriter, StringWriter}

import com.neowit.apex.{MetaXml, MetadataType}
import com.neowit.utils._
Expand Down Expand Up @@ -225,7 +225,12 @@ class RefreshMetadata extends RetrieveMetadata {
}
} catch {
case ex:Throwable =>
println(ex)
val sw = new StringWriter
ex.printStackTrace(new PrintWriter(sw))
val stackTraceStr = sw.toString
// dump exception information to log
logger.error(ex)
logger.error(stackTraceStr)
//responseWriter.println("RESULT=FAILURE")
//responseWriter.println(new Message(ERROR, ex.toString))
ActionFailure(ErrorMessage(ex.toString))
Expand Down

0 comments on commit b8ef508

Please sign in to comment.