Skip to content

Commit

Permalink
Use FeedbackProvidedException instead of AlreadyHandledException
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones committed Jan 13, 2025
1 parent cc6f7e5 commit e2f896b
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 e2f896b

Please sign in to comment.