diff --git a/plugin/src/main/scala/com/github/sbt/avro/SbtAvro.scala b/plugin/src/main/scala/com/github/sbt/avro/SbtAvro.scala index 489d082..dec1e03 100644 --- a/plugin/src/main/scala/com/github/sbt/avro/SbtAvro.scala +++ b/plugin/src/main/scala/com/github/sbt/avro/SbtAvro.scala @@ -283,8 +283,7 @@ object SbtAvro extends AutoPlugin { } catch { case e: Exception => out.log.err(e.getMessage) - // avoid stacktrace in sbt - throw new AlreadyHandledException(e) + throw new AvroGenerateFailedException } finally { avroClassLoader.close() } @@ -300,3 +299,7 @@ object SbtAvro extends AutoPlugin { } } + +class AvroGenerateFailedException + extends RuntimeException("Avro generate failed") + with FeedbackProvidedException