• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 package com.android.tools.r8.debuginfo;
5 
6 public class ScopedExceptionsTest {
7 
scopedExceptions()8   private static int scopedExceptions() {
9     try {
10       throwNPE();
11     }
12     catch (NullPointerException e) {}
13     catch (Throwable e) {
14       System.out.println("Unexpected...");
15     }
16     return 42;
17   }
18 
throwNPE()19   private static void throwNPE() {
20     throw new NullPointerException();
21   }
22 
main(String[] args)23   public static void main(String[] args) {
24     System.out.print(scopedExceptions());
25   }
26 }
27