|
Re: get Class and Method name of calling class
|
Posted: Oct 5, 2005 11:36 PM
|
|
> > Hi, > > I'm running 1.3.1 and when I throw the exception > > e.getStackTrace() is not an available option, not sure > > why. Do you have any other suggestions on how to find > the > > calling class? > > > That's coz there is neither such a method in Java 3, nor > 4, nor 5. What you are looking for is: > > e.printStackTrace(); > > Make use of the Java API (Java Doc) on the Sun website, > it is your friend. > Oops my baad, I took the trouble of going through the Java 5 API considering I noted the code was posted by Matt, and to dispute code written by him, you really need your facts aligned. So my bad, getStackTrace() does exist in Java 5, so it might be that it din't exist in the older versions - I'm too lazy to check, but if you're the one writing the application, you should check.
> > Thanks > > Kondwani
|
|