From 835dbd38052aa81296c7cff32981907afd7c231e Mon Sep 17 00:00:00 2001 From: exoego Date: Thu, 20 Jun 2019 08:27:27 +0900 Subject: [PATCH] Empty stack trace since it does not help users. --- .../scala/com/github/tanishiking/scalaunfmt/cli/Cli.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/scala/com/github/tanishiking/scalaunfmt/cli/Cli.scala b/src/main/scala/com/github/tanishiking/scalaunfmt/cli/Cli.scala index 5c2cd80..593dee7 100644 --- a/src/main/scala/com/github/tanishiking/scalaunfmt/cli/Cli.scala +++ b/src/main/scala/com/github/tanishiking/scalaunfmt/cli/Cli.scala @@ -30,10 +30,12 @@ object Cli { } match { case Success(v) => v case Failure(e: NoSuchFileException) => - throw new IllegalArgumentException( - s"""Configuration file ${e.getFile} not found. - |Provide the file in reference to https://github.com/tanishiking/scalaunfmt#configuration""".stripMargin + val exception = new IllegalArgumentException( + s"""Configuration file ${ e.getFile } not found. +Provide the file in reference to https://github.com/tanishiking/scalaunfmt#configuration""".stripMargin ) + exception.setStackTrace(Array.empty) + throw exception case Failure(e) => throw e // unknown }