FileDocCategorySizeDatePackage
Rethrowing.javaAPI DocExample3096Mon Apr 06 18:10:24 BST 1998None

Rethrowing

public class Rethrowing extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidf()

    System.out.println(
      "originating the exception in f()");
    throw new Exception("thrown from f()");
  
public static voidg()

    try {
      f();
    } catch(Exception e) {
      System.out.println(
        "Inside g(), e.printStackTrace()");
      e.printStackTrace();
      throw e; // 17
      // throw e.fillInStackTrace(); // 18
    }
  
public static voidmain(java.lang.String[] args)

    try {
      g();
    } catch(Exception e) {
      System.out.println(
        "Caught in main, e.printStackTrace()");
      e.printStackTrace();
    }