diff options
Diffstat (limited to 'test/files/run/try-2.scala')
-rw-r--r-- | test/files/run/try-2.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/run/try-2.scala b/test/files/run/try-2.scala index da321f2668..b55977ba8b 100644 --- a/test/files/run/try-2.scala +++ b/test/files/run/try-2.scala @@ -12,42 +12,42 @@ object Test { throw new Error(); } catch { - case _ => Console.println("exception happened\n"); + case _: Throwable => Console.println("exception happened\n"); } def tryUnitAll: Unit = try { Console.println("Nothin"); } catch { - case _ => sys.error("Bad, bad, lama!"); + case _: Throwable => sys.error("Bad, bad, lama!"); } def tryAllAll: Unit = try { throw new Error(); } catch { - case _ => sys.error("Bad, bad, lama!"); + case _: Throwable => sys.error("Bad, bad, lama!"); } def tryUnitUnit: Unit = try { Console.println("Nothin"); } catch { - case _ => Console.println("Nothin"); + case _: Throwable => Console.println("Nothin"); } def tryIntUnit: Unit = try { 10; } catch { - case _ => Console.println("Huh?"); + case _: Throwable => Console.println("Huh?"); } def execute(f: => Unit) = try { f; } catch { - case _ => (); + case _: Throwable => (); } |