Skip to content

Commit

Permalink
ScalafmtReflect: rethrow config-parsing exceptions
Browse files Browse the repository at this point in the history
The reflected exception type can't be used directly, so wrap it in the
ConfigParseError.
  • Loading branch information
kitbellew committed Jul 5, 2020
1 parent aef248d commit e0c53f3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ case class ScalafmtReflect(
configText.asParam,
fromHoconEmptyPath.asParam(optionCls)
)
case ReflectionException(e) =>
throw new ScalafmtDynamicError.ConfigParseError(
configPath,
e.getMessage
)
}

try {
Expand Down

0 comments on commit e0c53f3

Please sign in to comment.