fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class LXException extends RuntimeException { }
  6.  
  7. class UncheckedExceptions {
  8.  
  9. static void doSomethingL5(int x) {
  10. doSomethingL4(x * 3 + 0);
  11. doSomethingL4(x * 3 + 1);
  12. doSomethingL4(x * 3 + 2);
  13. }
  14.  
  15. static void doSomethingL4(int x) {
  16. doSomethingL3(x * 3 + 0);
  17. doSomethingL3(x * 3 + 1);
  18. doSomethingL3(x * 3 + 2);
  19. }
  20.  
  21. static void doSomethingL3(int x) {
  22. doSomethingL2(x * 3 + 0);
  23. doSomethingL2(x * 3 + 1);
  24. doSomethingL2(x * 3 + 2);
  25. }
  26.  
  27. static void doSomethingL2(int x) {
  28. doSomethingL1(x * 3 + 0);
  29. doSomethingL1(x * 3 + 1);
  30. doSomethingL1(x * 3 + 2);
  31. }
  32.  
  33. static void doSomethingL1(int x) {
  34. if (x == 42) {
  35. throw new LXException();
  36. }
  37. }
  38.  
  39. public static void main (String[] args) throws Exception {
  40. doSomethingL5(0);
  41. }
  42. }
Runtime error #stdin #stdout #stderr 0.12s 320576KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "main" LXException
	at UncheckedExceptions.doSomethingL1(Main.java:35)
	at UncheckedExceptions.doSomethingL2(Main.java:28)
	at UncheckedExceptions.doSomethingL3(Main.java:24)
	at UncheckedExceptions.doSomethingL4(Main.java:17)
	at UncheckedExceptions.doSomethingL5(Main.java:11)
	at UncheckedExceptions.main(Main.java:40)