Tutorial :Getting source code information from groovy stack trace


When exception generated I want to show some additional information (source code) for particular exception. But grails have very hairy exceptions (it's all about groovy dynamic nature). It's my problem where to get and how to display source code. All I need is file/line information.

So... Is there any possibility to get file and line where exception were generated in grails/groovy?


Hmm, you aren't already getting this? All my grails exceptions have file/line information in them by default. The only difficulty is that if the exception is in a closure, it doesn't show the actual closure name. Could you post a sample stacktrace?

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »