Java tutorial
//package com.java2s; public class Main { public static RuntimeException runtimeException(Throwable e) { if (e instanceof RuntimeException) return (RuntimeException) e; else return new RuntimeException(e); } }