Linked Questions

5 votes
2 answers
10k views

is there a way to add a command in Java to add the current backtrace ? I'm writing a red5 application and the appDisconnect function is being called twice. whenever a user changes room. I want to add ...
ufk's user avatar
  • 32.4k
2 votes
3 answers
4k views

Possible Duplicate: Get current stack trace in Java I have a method that saves messages to a file. This method is called from many different parts of my main program. Is there any way that I can ...
Frank's user avatar
  • 31.1k
2 votes
1 answer
621 views

For practicing algorithm questions, I set up my Java code like: ProblemClass.java public static void main(String[] args) { Solution solution = new ProblemClass().new Solution(); Utils....
return 0's user avatar
  • 4,466
-1 votes
1 answer
791 views

Lets say I have a function like this public JSONObject parseMessage(InputStream fileName) throws Exception { And it throws an error where can I get the stack trace of that? I know if I have ...
iqueqiorio's user avatar
  • 1,187
0 votes
1 answer
171 views

Possible Duplicate: Get current stack trace in Java Here is the thing, i want to get a list of all called methods in a java class. So far i've been using eclemma, but that just insn't enough. I ...
Charles's user avatar
  • 620
0 votes
0 answers
112 views

I have a classes in my project with the following structure Class A Class B Class C Under Class C.... I have the function mention below public static String getCallingClassname() { ...
Naseem's user avatar
  • 961
1 vote
0 answers
67 views

I want to create a method such that if i call that from any class it should get the class name from which the method has been called and can also print the class name.
Harshit Gupta's user avatar
1 vote
0 answers
63 views

Is it possible to add debugging code in a Java method which would determine which client method invoked that particular method using perhaps reflection, in very much the same way the call stack is ...
amphibient's user avatar
  • 31.7k
151 votes
9 answers
119k views

In Android (Java) how do I print out a full stack trace? If my application crashes from nullPointerException or something, it prints out a (almost) full stack trace like so: java.io.IOException: ...
Jake Wilson's user avatar
  • 91.8k
114 votes
3 answers
87k views

How do I print a stack trace from JavaScript? The answer How can I get a Javascript stack trace when I throw an exception? deals with throwing an exception, but I need to print stack traces to debug ...
Michael Osofsky's user avatar
13 votes
8 answers
807 views

I would like to write a code internal to my method that print which method/class has invoked it. (My assumption is that I can't change anything but my method..) How about other programming languages?...
DuduAlul's user avatar
  • 6,400
19 votes
7 answers
5k views

For logging purposes, I created a method logTitle() that prints out the calling method name for our TestNG tests. Sample code is below. @Test public void test1() throws Exception { method1(); } ...
Greg's user avatar
  • 4,115
15 votes
8 answers
8k views

Some 3rd party library swallowed an Exception: String getAnswer(){ try{ // do stuff, modify instance state, maybe throw some exceptions // ... return computeAnswer(); ...
tom91136's user avatar
  • 9,032
13 votes
4 answers
5k views

Suppose I have a class in my package org.jake and it has a method with default access (no modifier). Then the method is visible inside the package only. However, when someone receives the jar of my ...
Jake's user avatar
  • 15.3k
18 votes
2 answers
5k views

I am working on a Java application which has a threading issue. While using the applications for some time with Netbeans profiler attached, I can see several threads are created. Most of them finish ...
Ankit's user avatar
  • 7,030

15 30 50 per page
1
2 3 4 5