We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fe6252 commit e4655b1Copy full SHA for e4655b1
src/main/scala/org/monarchinitiative/dosdp/cli/Main.scala
@@ -40,10 +40,13 @@ object Main extends ZCommandApp[Config] {
40
) >>> initializeSlf4jBridge
41
val program = ZIO.effectTotal(JenaSystem.init()) *> config.run
42
program
43
+ .tapError { e =>
44
+ if (config.common.verbose) ZIO.succeed(e.printStackTrace())
45
+ else log.error(e.getMessage)
46
+ }
47
.as(ExitCode.success)
48
.catchAll { case DOSDPError(_, e) =>
- if (config.common.verbose) ZIO.effectTotal(e.printStackTrace()).as(ExitCode.failure)
- else ZIO.unit.as(ExitCode.failure)
49
+ ZIO.unit.as(ExitCode.failure)
50
}
51
.provideCustomLayer(env)
52
0 commit comments