Mercurial Hosting > luan
comparison core/src/luan/impl/LuanCompiler.java @ 459:30544d1a9cbf
better stack overflow handling
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Wed, 06 May 2015 12:58:06 -0600 |
| parents | 0ca5d1d6250b |
| children | b48cfa14ba60 |
comparison
equal
deleted
inserted
replaced
| 458:507c0af598ba | 459:30544d1a9cbf |
|---|---|
| 36 return parser.RequiredModule(); | 36 return parser.RequiredModule(); |
| 37 } catch(ParseException e) { | 37 } catch(ParseException e) { |
| 38 //e.printStackTrace(); | 38 //e.printStackTrace(); |
| 39 LuanElement le = new LuanSource.CompilerElement(parser.source); | 39 LuanElement le = new LuanSource.CompilerElement(parser.source); |
| 40 throw luan.bit(le).exception( e.getFancyMessage() ); | 40 throw luan.bit(le).exception( e.getFancyMessage() ); |
| 41 } catch(StackOverflowError e) { | |
| 42 LuanElement le = new LuanSource.CompilerElement(parser.source); | |
| 43 throw luan.bit(le).exception("stack overflow"); | |
| 44 } | 41 } |
| 45 } | 42 } |
| 46 | 43 |
| 47 public static LuanState newLuanState() { | 44 public static LuanState newLuanState() { |
| 48 return new LuanStateImpl(); | 45 return new LuanStateImpl(); |
