Stacktrace missing

Hi,

I am throwing an integer value from various functions called from methods. Integer value represents the error number that I use to query the message from database. Problem is if it is not handled there is no stacktrace information on the console log. All I get is “Exception while invoking method ‘MyMethod’ undefined”.

How can I get the full stacktrace for custom errors?