Mercurial Hosting > luan
diff core/src/luan/LuanException.java @ 683:67dd1449e354
fix java security
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 14 Apr 2016 21:51:55 -0600 |
parents | 0c334975d526 |
children | 51a134a8c89b |
line wrap: on
line diff
--- a/core/src/luan/LuanException.java Thu Apr 14 21:41:40 2016 -0600 +++ b/core/src/luan/LuanException.java Thu Apr 14 21:51:55 2016 -0600 @@ -125,4 +125,10 @@ return sb.toString(); } + public static String currentSource() { + LuanException ex = new LuanException("currentSource"); + List<StackTraceElement> st = ex.justLuan(); + return st.isEmpty() ? null : st.get(0).getFileName(); + } + }