diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/core/Decorators.scala | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Decorators.scala b/src/dotty/tools/dotc/core/Decorators.scala index 3575029e8..99af4d0cb 100644 --- a/src/dotty/tools/dotc/core/Decorators.scala +++ b/src/dotty/tools/dotc/core/Decorators.scala @@ -157,10 +157,15 @@ object Decorators { (treatSingleArg(arg), suffix) } - def treatSingleArg(arg: Any) : Any = arg match { - case arg: Showable => arg.show - case _ => arg - } + def treatSingleArg(arg: Any) : Any = + try + arg match { + case arg: Showable => arg.show + case _ => arg + } + catch { + case ex: Exception => s"(missing due to $ex)" + } val prefix :: suffixes = sc.parts.toList val (args1, suffixes1) = (args, suffixes).zipped.map(treatArg(_, _)).unzip |