Top "Exception-handling" questions

An exception is an unusual condition that requires deviation from the program's normal flow.

How to throw std::exceptions with variable messages?

This is an example of what I often do when I want to add some information to an exception: std::…

c++ exception exception-handling
WPF global exception handler

Sometimes, under not reproducible circumstances, my WPF application crashes without any message. The application simply close instantly. Where is the …

c# .net wpf exception exception-handling
When to catch java.lang.Error?

In what situations should one catch java.lang.Error on an application?

java exception error-handling exception-handling
Throw HttpResponseException or return Request.CreateErrorResponse?

After reviewing an article Exception Handling in ASP.NET Web API I am a bit confused as to when to …

c# exception-handling asp.net-web-api http-status-codes
How to throw RuntimeException ("cannot find symbol")

I'm trying to throw an exception in my code like this: throw RuntimeException(msg); But when I build in NetBeans …

java exception-handling runtimeexception
Good Patterns For VBA Error Handling

What are some good patterns for error handling in VBA? In particular, what should I do in this situation: ... some …

exception vba exception-handling
How to print full stack trace in exception?

For example, in one place... //---------------a try { // some network call } catch(WebException we) { throw new MyCustomException("some message ....", we); } ...and …

c# exception-handling stack-trace
Java 8: Lambda-Streams, Filter by Method with Exception

I have a problem trying out the Lambda expressions of Java 8. Usually it works fine, but now I have methods …

java exception-handling lambda java-8
throwing an exception in objective-c/cocoa

What's the best way to throw an exception in objective-c/cocoa?

objective-c cocoa exception-handling
How do I fix a compilation error for unhandled exception on call to Thread.sleep()?

I am new to Java and kind of new to programming (I know diving straight into Java probably wasn't the …

java exception-handling checked-exceptions