Skip to content

Commit

Permalink
Log visualization evaluation errors (#1956)
Browse files Browse the repository at this point in the history
Log errors during the visualization evaluation
  • Loading branch information
4e6 authored and iamrecursion committed Aug 18, 2021
1 parent a42823d commit 7a6d758
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.enso.interpreter.instrument.job

import java.util.logging.Level

import cats.implicits._
import org.enso.interpreter.instrument.{InstrumentFrame, Visualisation}
import org.enso.interpreter.instrument.execution.{Executable, RuntimeContext}
Expand Down Expand Up @@ -143,8 +145,15 @@ class UpsertVisualisationJob(
ctx.executionService.evaluateExpression(module, expression)
}
.leftMap { error =>
ctx.executionService.getLogger
.log(
Level.SEVERE,
"Evaluation of visualization failed: " +
s"[${error.getClass}] ${error.getMessage}",
error
)
EvaluationFailed(
error.getMessage,
Option(error.getMessage).getOrElse(error.getClass.getSimpleName),
ProgramExecutionSupport.getDiagnosticOutcome.lift(error)
)
}
Expand Down

0 comments on commit 7a6d758

Please sign in to comment.