diff --git a/scalafmt-dynamic/src/main/scala/org/scalafmt/dynamic/ScalafmtReflect.scala b/scalafmt-dynamic/src/main/scala/org/scalafmt/dynamic/ScalafmtReflect.scala index 634eb84b27..804ea50479 100644 --- a/scalafmt-dynamic/src/main/scala/org/scalafmt/dynamic/ScalafmtReflect.scala +++ b/scalafmt-dynamic/src/main/scala/org/scalafmt/dynamic/ScalafmtReflect.scala @@ -75,6 +75,11 @@ case class ScalafmtReflect( configText.asParam, fromHoconEmptyPath.asParam(optionCls) ) + case ReflectionException(e) => + throw new ScalafmtDynamicError.ConfigParseError( + configPath, + e.getMessage + ) } try {