Mercurial Hosting > luan
comparison core/src/luan/impl/LuanCompiler.java @ 457:0ca5d1d6250b
handle StackOverflowError for circular references
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 05 May 2015 23:10:34 -0600 |
parents | 23b99a5039b5 |
children | 30544d1a9cbf |
comparison
equal
deleted
inserted
replaced
456:ceb3fd33adf1 | 457:0ca5d1d6250b |
---|---|
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"); | |
41 } | 44 } |
42 } | 45 } |
43 | 46 |
44 public static LuanState newLuanState() { | 47 public static LuanState newLuanState() { |
45 return new LuanStateImpl(); | 48 return new LuanStateImpl(); |