public class ErrorTest { public static void main(String[] args) { try { throw new ClassFormatError("This is a test"); } catch (Error e) { System.out.println("in catch clause "); System.err.println(e); System.out.println("in catch clause "); } } }