diff options
author | Paul Phillips <paulp@improving.org> | 2012-07-27 02:45:00 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-07-27 05:42:17 -0700 |
commit | 61d1933e29e1730a981edf738c902a39c7d322de (patch) | |
tree | 5eb493e812687d05af8628b0ba6c3fe7c1d460cd /src/partest | |
parent | 785c4ddedd68914f7b5667d0e9733e3fddebe1a0 (diff) | |
download | scala-61d1933e29e1730a981edf738c902a39c7d322de.tar.gz scala-61d1933e29e1730a981edf738c902a39c7d322de.tar.bz2 scala-61d1933e29e1730a981edf738c902a39c7d322de.zip |
Eliminated remainder of "catches Throwable" warnings.
And also non-exhaustive matches.
And added -nowarn to the build options for scalacheck,
we don't need to hear the warnings for code we aren't
able to fix.
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/DirectTest.scala | 2 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/ScaladocModelTest.scala | 2 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/RunnerManager.scala | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/partest/scala/tools/partest/DirectTest.scala b/src/partest/scala/tools/partest/DirectTest.scala index 5b4e1b4b25..323705b695 100644 --- a/src/partest/scala/tools/partest/DirectTest.scala +++ b/src/partest/scala/tools/partest/DirectTest.scala @@ -70,7 +70,7 @@ abstract class DirectTest extends App { /** Constructor/main body **/ try show() - catch { case t => println(t.getMessage) ; t.printStackTrace ; sys.exit(1) } + catch { case t: Exception => println(t.getMessage) ; t.printStackTrace ; sys.exit(1) } /** Debugger interest only below this line **/ protected def isDebug = (sys.props contains "partest.debug") || (sys.env contains "PARTEST_DEBUG") diff --git a/src/partest/scala/tools/partest/ScaladocModelTest.scala b/src/partest/scala/tools/partest/ScaladocModelTest.scala index ffc5e74cc0..fa99f03614 100644 --- a/src/partest/scala/tools/partest/ScaladocModelTest.scala +++ b/src/partest/scala/tools/partest/ScaladocModelTest.scala @@ -72,7 +72,7 @@ abstract class ScaladocModelTest extends DirectTest { testModel(universe.rootPackage) println("Done.") } catch { - case e => + case e: Exception => println(e) e.printStackTrace } diff --git a/src/partest/scala/tools/partest/nest/RunnerManager.scala b/src/partest/scala/tools/partest/nest/RunnerManager.scala index dc15d4475b..5a7684dc61 100644 --- a/src/partest/scala/tools/partest/nest/RunnerManager.scala +++ b/src/partest/scala/tools/partest/nest/RunnerManager.scala @@ -82,7 +82,7 @@ class RunnerManager(kind: String, val fileManager: FileManager, params: TestRunP private def compareFiles(f1: File, f2: File): String = try fileManager.compareFiles(f1, f2) - catch { case t => t.toString } + catch { case t: Exception => t.toString } /** This does something about absolute paths and file separator * chars before diffing. @@ -779,11 +779,11 @@ class RunnerManager(kind: String, val fileManager: FileManager, params: TestRunP logStackTrace(logFile, t, "Possible compiler crash during test of: " + testFile + "\n") LogContext(logFile) } - catch { case t => LogContext(null) } + catch { case t: Throwable => LogContext(null) } } def run(): (Boolean, LogContext) = { - val result = try processSingleFile(testFile) catch { case t => (false, crashContext(t)) } + val result = try processSingleFile(testFile) catch { case t: Throwable => (false, crashContext(t)) } passed = Some(result._1) result } |