diff options
author | Paul Phillips <paulp@improving.org> | 2012-10-02 10:37:13 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-10-04 16:08:31 -0700 |
commit | d7354838948be58b8045e1218a9c757d9b90df76 (patch) | |
tree | f034b77a430cb98fc6f5add55e645be28b0cf21e /test/files/neg/catch-all.check | |
parent | 1f99df2c66cb1933dd4db74aa872497a4e26975b (diff) | |
download | scala-d7354838948be58b8045e1218a9c757d9b90df76.tar.gz scala-d7354838948be58b8045e1218a9c757d9b90df76.tar.bz2 scala-d7354838948be58b8045e1218a9c757d9b90df76.zip |
Fix for spurious warning.
Eliminates spurious "catch block may intercept non-local return"
seen in recent builds of master. Unified some catch logic
in TreeInfo, and removed some which never worked.
Diffstat (limited to 'test/files/neg/catch-all.check')
-rw-r--r-- | test/files/neg/catch-all.check | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/files/neg/catch-all.check b/test/files/neg/catch-all.check index aaf51480c3..2d58dd99a8 100644 --- a/test/files/neg/catch-all.check +++ b/test/files/neg/catch-all.check @@ -1,10 +1,13 @@ -catch-all.scala:2: warning: 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, which often has undesirable consequences. +If intentional, use `case _ : Throwable` to clear this warning. try { "warn" } catch { case _ => } ^ -catch-all.scala:4: warning: 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, which often has undesirable consequences. +If intentional, use `case x : Throwable` to clear this warning. try { "warn" } catch { case x => } ^ -catch-all.scala:6: warning: 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, which often has undesirable consequences. +If intentional, use `case x : Throwable` to clear this warning. try { "warn" } catch { case _: RuntimeException => ; case x => } ^ error: No warnings can be incurred under -Xfatal-warnings. |