From c8c652fe2ddb0f67131b45e6a1ff9531e978ebc3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 29 Apr 2019 20:37:55 +0100 Subject: [PATCH] [main] report any errors --- src/main/scala/net/kemitix/s3thorp/Main.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/scala/net/kemitix/s3thorp/Main.scala b/src/main/scala/net/kemitix/s3thorp/Main.scala index cc02929..961f933 100644 --- a/src/main/scala/net/kemitix/s3thorp/Main.scala +++ b/src/main/scala/net/kemitix/s3thorp/Main.scala @@ -1,6 +1,6 @@ package net.kemitix.s3thorp -import cats.effect.ExitCase.Canceled +import cats.effect.ExitCase.{Canceled, Completed, Error} import cats.effect.{ExitCode, IO, IOApp} import cats.syntax.all._ @@ -14,7 +14,8 @@ object Main extends IOApp { override def run(args: List[String]): IO[ExitCode] = exec(args).guaranteeCase { case Canceled => IO(println("Interrupted")) - case _ => IO(println("Done")) + case Error(e) => IO(println("ERROR: " + e)) + case Completed => IO(println("Done")) } }