cprover
unwrap_nested_exception.h File Reference
#include <exception>
#include <string>
+ Include dependency graph for unwrap_nested_exception.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string unwrap_exception (const std::exception &e, int level=0)
 Given a potentially nested exception, produce a string with all of nested exceptions information. More...
 

Function Documentation

◆ unwrap_exception()

std::string unwrap_exception ( const std::exception &  e,
int  level 
)

Given a potentially nested exception, produce a string with all of nested exceptions information.

If a nested exception string contains new lines then the newlines are indented to the correct level.

Parameters
eThe outer exeception
levelHow many exceptions have already been unrolled
Returns
A string with all nested exceptions printed and indented

Definition at line 24 of file unwrap_nested_exception.cpp.