MainCatch.hx 249 B

12345678910111213141516171819
  1. class MainCatch {
  2. public static function main():Void {
  3. test();
  4. }
  5. static function test() {
  6. function log() {
  7. log();
  8. }
  9. try {
  10. log();
  11. } catch(s:String) {
  12. if(s != 'Stack overflow') {
  13. Sys.exit(1);
  14. }
  15. }
  16. return macro {};
  17. }
  18. }