diff options
author | rockjam <5min4eq.unity@gmail.com> | 2016-06-24 07:27:07 +0300 |
---|---|---|
committer | rockjam <5min4eq.unity@gmail.com> | 2016-06-24 07:27:36 +0300 |
commit | 40377746689a198e8ea0be27540e999e0346a0df (patch) | |
tree | 3b8c8e2012afeb9d12d31cf9871ddb52630340a4 /examples/scalafmt-example/build/build.scala | |
parent | e709c5f02290680cd05c18e470b57decb931e62d (diff) | |
download | cbt-40377746689a198e8ea0be27540e999e0346a0df.tar.gz cbt-40377746689a198e8ea0be27540e999e0346a0df.tar.bz2 cbt-40377746689a198e8ea0be27540e999e0346a0df.zip |
remove catching exception in task
Diffstat (limited to 'examples/scalafmt-example/build/build.scala')
-rw-r--r-- | examples/scalafmt-example/build/build.scala | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/scalafmt-example/build/build.scala b/examples/scalafmt-example/build/build.scala index 6f77108..a489616 100644 --- a/examples/scalafmt-example/build/build.scala +++ b/examples/scalafmt-example/build/build.scala @@ -15,14 +15,10 @@ class Build(val context: Context) extends BuildBuild with Scalafmt { import scala.collection.JavaConverters._ val utf8 = Charset.forName("UTF-8") sourceFiles foreach { file => - try { - val path = file.toPath - val fileLines = Files.readAllLines(path, utf8).asScala - val brokenLines = fileLines map (_.dropWhile(_ ==' ')) - Files.write(path, brokenLines.asJava, utf8) - } catch { - case e: Exception => System.err.print(s"Error happend when breaking formatting: ${e}") - } + val path = file.toPath + val fileLines = Files.readAllLines(path, utf8).asScala + val brokenLines = fileLines map (_.dropWhile(_ == ' ')) + Files.write(path, brokenLines.asJava, utf8) } System.err.println("Done breaking formatting") } |