What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

Sometimes I write code that is not perfect. I know that because my console sometimes looks like this:

Exception in thread "blahblahblah" java.lang.StackOverflowError

    at java.lang.Thread.currentThread(Native Method)
    at java.lang.ThreadLocal.get(ThreadLocal.java:124)
    ...

Naturally, when this happens, I rush to Google with search phrases like

getting a stack overflow when I call foo() on a Bar

As you might expect, this leads to search results like

baz — is Baz framework a good choice if I need to foo lots of bars? — Stack Overflow

and

bar — how to foo bars with regexes — Stack Overflow

How can I better search for stack overflow errors without just getting links to stackoverflow.com?

share|improve this question

marked as duplicate by AakashM, hims056, Bo Persson, Toon Krijthe, Rory Mar 12 '13 at 11:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Okay, yes, strictly speaking, this is off-topic, because it's a question about using search engines, not using Stack Exchange. But it's so close/relevant that I think it's okay... along the same lines as SO allowing questions about IDEs. –  Pops Mar 11 '13 at 19:23

4 Answers 4

While it hasn't always been the best, using Stack Overflow's search avoids this problem just fine. The site can distinguish between itself and its content without difficulty.

share|improve this answer
2  
it also accounts for punctuation –  Sam I am Mar 11 '13 at 19:28

I'm assuming you are asking about general searching outside the SO environment. Whenever I use a search engine for a specific error, I try to search for the exact error message itself.

In other words, if you search for "Stack Overflow Error", you'll get lots of hits that refer to this site while searching for "java.lang.StackOverFlowError" seems more precise.

share|improve this answer
    
I just tested this on Google, and the early hits for java.lang.StackOverFlowError were all relevant to the exception, even if the hit was on a stackoverflow.com page. –  Patricia Shanahan Mar 11 '13 at 23:28

Also, and I don't mean this the wrong way, its happened to me plenty of times: Usually when you get that type of error (stack overflow, out of memory, other infinite loop situations), it's because you made a mistake in the code that calls Bar.foo() rather than problem with the Bar implementation itself. Therefore, it's unlikely that there is a cookie cutter solution available for your problem, anyway.

And, of course, in that case the people at stackoverflow.com are more than happy to help.

share|improve this answer

You could just divide the search space into that within and without Stack Overflow -- first search within SO then head to google to search with "-site:stackoverflow.com". That ought to cover all bases.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .