Here at Raygun, we want to provide as much information about errors as possible so you can get to the bottom of problems hassle-free – and this includes surfacing the stack traces for InnerErrors.
We’ve had a few inquiries as to how to find InnerErrors, so in this article, I’ll go through what they are, and where you can find them in your Error Summary page inside the Raygun app.
Firstly, what is an InnerError?
Microsoft describes an InnerError (or inner exception) in the following way:
“When an exception X is thrown as a direct result of a previous exception Y, the InnerException property of X should contain a reference to Y.
Use the InnerException property to obtain the set of exceptions that led to the current exception.
You can create a new exception that catches an earlier exception. The code that handles the second exception can make use of the additional information from the earlier exception to handle the error more appropriately.”
With Raygun Crash Reporting and error monitoring, you can also add an InnerError to exceptions manually. Manual additions may be useful for people who throw their own custom exceptions. Raygun has special case handling for exceptions and inner exceptions, which you can read about here.
Which languages support InnerErrors?
InnerErrors are a common feature in object-oriented languages and can have different names, for example, in .NET, you may hear the term “wrapper exception” which refers to the outer error.
How can Raygun help?
It’s handy to be able to separate InnerError details from the main error stack trace. If you have Raygun Crash Reporting, there’s nothing you need to change. InnerError details are captured and surfaced automatically by Raygun. Raygun also allows you to display multiple InnerErrors in a single stack trace.
To find details on your InnerError, click on the error in the Crash Reporting Dashboard and onto the ‘Summary’ page. Here, you will see the InnerError details below the stack trace:
I hope you found this article on locating your InnerErrors useful. If you have any questions, get in touch with a team member, and we’ll be able to help.