Java tutorial
//package com.java2s; public class Main { public static final void throwException(final Exception e) { if ((e != null) && (e instanceof RuntimeException)) throw (RuntimeException) e; else throw new RuntimeException(e); } }