summaryrefslogblamecommitdiff
path: root/test/files/neg/catch-all.check
blob: 2d58dd99a893d18ca123e21e21aad746299b0d19 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                                                                                  

                                    

                                                                                                  

                                    

                                                                                                  

                                                                  


                                                          
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, 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, 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.
three warnings found
one error found