Skip to content

Commit

Permalink
don't swallow strack traces on unchecked exception
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaglin committed Jun 24, 2022
1 parent dd84703 commit d726607
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/scalafix/internal/sbt/ScalafixInterface.scala
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ class ScalafixInterface private (

def rulesThatWillRun(): Seq[ScalafixRule] =
try scalafixArguments.rulesThatWillRun().asScala
catch { case NonFatal(e) => throw new InvalidArgument(e.getMessage) }
catch {
case ScalafixException(e) => throw new InvalidArgument(e.getMessage)
}

def validate(): Option[ScalafixException] =
Option(scalafixArguments.validate().orElse(null))
Expand Down

0 comments on commit d726607

Please sign in to comment.