fork download
  1. class Exc0 extends Exception { }
  2. class Exc1 extends Exc0 { } /* Line 2 */
  3. public class Test
  4. {
  5. public static void main(String args[])
  6. {
  7. try
  8. {
  9. throw new Exc1(); /* Line 9 */
  10. }
  11. catch (Exc0 e0) /* Line 11 */
  12. {
  13. System.out.println("Ex0 caught");
  14. }
  15. catch (Exception e)
  16. {
  17. System.out.println("exception caught");
  18. }
  19. }
  20. }
Runtime error #stdin #stdout #stderr 0.02s 7452KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.rb:1: syntax error, unexpected tIDENTIFIER, expecting '<' or ';' or '\n'
class Exc0 extends Exception { } 
                  ^
prog.rb:2: syntax error, unexpected tIDENTIFIER, expecting '<' or ';' or '\n'
    class Exc1 extends Exc0 { } /* Line 2 */
                      ^
prog.rb:11: unterminated regexp meets end of file