Hey there guys and gals, here is a function that will find the function that is calling it. This is in AS3 It is great for debugging and quite reliable. I use this when I want to make my own custom errors. Enjoy
currFunction(){
return new Error().getStackTrace().toString().substring( new Error().getStackTrace().toString().indexOf("/") + 1, new Error().getStackTrace().toString().indexOf("["));
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment