import java.util.logging.Logger;

public class Rethrow
{
  private static Logger log = Logger.getAnonymousLogger();
  
  static void rethrow( RuntimeException e )
  {
    log.warning( "RuntimeException occurred!" );

    e.fillInStackTrace();

    throw e;
  }
  
  public static void main( String[] args )
  {
    try
    {
      ((String)null).length();
    }
    catch ( NullPointerException e )
    {
      rethrow( e );
    }
  }
}
