What can you throw in Java?
It depends on your JVM implementation. According to the Java VM specification it is undefined behavior if the object is not Throwable. The objectref must be of type reference and must refer to an object that is an instance of class Throwable or of a subclass of Throwable. In section 6.1, “The Meaning of ‘Must’”: … Read more