[main] report any errors
This commit is contained in:
parent
98c6c6b7df
commit
c8c652fe2d
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
package net.kemitix.s3thorp
|
package net.kemitix.s3thorp
|
||||||
|
|
||||||
import cats.effect.ExitCase.Canceled
|
import cats.effect.ExitCase.{Canceled, Completed, Error}
|
||||||
import cats.effect.{ExitCode, IO, IOApp}
|
import cats.effect.{ExitCode, IO, IOApp}
|
||||||
import cats.syntax.all._
|
import cats.syntax.all._
|
||||||
|
|
||||||
|
@ -14,7 +14,8 @@ object Main extends IOApp {
|
||||||
override def run(args: List[String]): IO[ExitCode] =
|
override def run(args: List[String]): IO[ExitCode] =
|
||||||
exec(args).guaranteeCase {
|
exec(args).guaranteeCase {
|
||||||
case Canceled => IO(println("Interrupted"))
|
case Canceled => IO(println("Interrupted"))
|
||||||
case _ => IO(println("Done"))
|
case Error(e) => IO(println("ERROR: " + e))
|
||||||
|
case Completed => IO(println("Done"))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue