Mercurial Hosting > luan
changeset 457:0ca5d1d6250b
handle StackOverflowError for circular references
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 05 May 2015 23:10:34 -0600 |
parents | ceb3fd33adf1 |
children | 507c0af598ba |
files | core/src/luan/impl/LuanCompiler.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
diff -r ceb3fd33adf1 -r 0ca5d1d6250b core/src/luan/impl/LuanCompiler.java --- a/core/src/luan/impl/LuanCompiler.java Tue May 05 22:58:23 2015 -0600 +++ b/core/src/luan/impl/LuanCompiler.java Tue May 05 23:10:34 2015 -0600 @@ -38,6 +38,9 @@ //e.printStackTrace(); LuanElement le = new LuanSource.CompilerElement(parser.source); throw luan.bit(le).exception( e.getFancyMessage() ); + } catch(StackOverflowError e) { + LuanElement le = new LuanSource.CompilerElement(parser.source); + throw luan.bit(le).exception("stack overflow"); } }