Skip to content

Commit

Permalink
Use FeedbackProvidedException instead of AlreadyHandledException (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones authored Jan 13, 2025
1 parent e6789a4 commit 46f5124
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugin/src/main/scala/com/github/sbt/avro/SbtAvro.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand All @@ -300,3 +299,7 @@ object SbtAvro extends AutoPlugin {
}

}

class AvroGenerateFailedException
extends RuntimeException("Avro generate failed")
with FeedbackProvidedException

0 comments on commit 46f5124

Please sign in to comment.