The Error Handling Infrastructure


Modern C++ recommends the use of exceptions to handle both logic and runtime errors. 3FD offers a robust infrastructure for error/exception handling which combines stack tracing, less code typing and low overhead. The stack tracing feature is optional for the sake of performance, but you probably want to use it at least in the testing phase.

The core of the error handling infrastructure is made of the AppException class and the stack tracer. When the client code instantiates an AppException, it packs information like a message, details, call stack trace, time, source file name and line number. When an exception is caught, you have this information to report just like in .NET. You can also choose to send it to the configured log output.

Sample of the log recorded by the framework:

Log output example

Last edited May 10, 2014 at 6:10 AM by faburaya, version 6

Comments

No comments yet.