diff options
author | Paul Phillips <paulp@improving.org> | 2012-08-10 07:29:31 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-08-10 12:28:50 -0700 |
commit | fbbbb2294680c0f57506f885971b148cae53c92d (patch) | |
tree | d2500556943fd4a63cad5752a0aa5a0caf3b329d /test/files/neg/catch-all.check | |
parent | 7dd0ead39ceb7cd6f445d86f37c68b78218eef57 (diff) | |
download | scala-fbbbb2294680c0f57506f885971b148cae53c92d.tar.gz scala-fbbbb2294680c0f57506f885971b148cae53c92d.tar.bz2 scala-fbbbb2294680c0f57506f885971b148cae53c92d.zip |
Made -Xfatal-warnings less immediately fatal.
Instead of changing warnings to errors mid-stream, at the end of
a run I check for condition "no errors, some warnings, and fatal
warnings" and then generate an error at that point. This is
necessary to test for some warnings which come from later stages.
Diffstat (limited to 'test/files/neg/catch-all.check')
-rw-r--r-- | test/files/neg/catch-all.check | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/files/neg/catch-all.check b/test/files/neg/catch-all.check index a9cd0ba927..d59e826f03 100644 --- a/test/files/neg/catch-all.check +++ b/test/files/neg/catch-all.check @@ -1,10 +1,12 @@ -catch-all.scala:2: error: This catches all Throwables. If this is really intended, use `case _: Throwable` to clear this warning. +catch-all.scala:2: warning: This catches all Throwables. If this is really intended, use `case _: Throwable` to clear this warning. try { "warn" } catch { case _ => } ^ -catch-all.scala:4: error: This catches all Throwables. If this is really intended, use `case x: Throwable` to clear this warning. +catch-all.scala:4: warning: This catches all Throwables. If this is really intended, use `case x: Throwable` to clear this warning. try { "warn" } catch { case x => } ^ -catch-all.scala:6: error: This catches all Throwables. If this is really intended, use `case x: Throwable` to clear this warning. +catch-all.scala:6: warning: This catches all Throwables. If this is really intended, use `case x: Throwable` to clear this warning. try { "warn" } catch { case _: RuntimeException => ; case x => } ^ -three errors found +error: No warnings can be incurred under -Xfatal-warnings. +three warnings found +one error found |