Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Macros | Functions | Variables
crash_report.cc File Reference
#include <utility/crash_report.hh>
#include <utility/version.hh>
#include <utility/backtrace.hh>
#include <utility/excn/Exceptions.hh>
#include <utility/CSI_Sequence.hh>
#include <sstream>
#include <fstream>
#include <iostream>
#include <exception>
#include <typeinfo>
#include <csignal>

Namespaces

 utility
 unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 0.
 

Macros

#define STRINGIFY_IMPL(x)   #x
 
#define STRINGIFY(x)   STRINGIFY_IMPL(x)
 

Functions

static std::string const
static COMPILER("Unknown
compiler") static std
std::string const 
OS_VER ("Unknown Operating System")
 
static std::string const MODE ("Debug")
 
std::string get_extras ()
 
static std::string const utility::CRASH_FILE ("ROSETTA_CRASH.log")
 
static std::string utility::APPNAME ("UNKNOWN APPLICATION")
 
static std::string utility::OPTIONS ("NO OPTIONS SPECIFIED")
 
static std::string const utility::HEADER ("##############################################################################################################\n""#\n""# Rosetta crash log. Please submit the contents of this file to http://crash.rosettacommons.org/\n""# or use the script Rosetta/main/source/scripts/python/public/report_crashes.py\n""#\n\n")
 
void utility::signal_handler (int signal)
 
void utility::terminate_handler ()
 
void utility::install_crash_handler ()
 Set the crash handler for non-standard crashes (e.g. segfaults) Should only be called once at startup. More...
 
void utility::set_application_name (char const *appname)
 Set the application name that this was launched as. Should only be called once on startup. More...
 
void utility::set_options_string (std::string const &options)
 Set the string representation of the options to be used in the crash report Should only be called once on startup. More...
 
void utility::set_show_crash_report_on_console (bool setting)
 If passed true, any backtrace will show up on stderr in addition to the crash report file. More...
 
void utility::save_crash_report (char const *message="(none)", std::string const &file="(none)", int const line=0)
 Save a crash report to the crash reporter file. More...
 
void utility::save_crash_report (char const *message, std::string const &file, int line, std::string const &traceback)
 
void utility::save_crash_report_to_file (char const *message, std::string const &file, int line, std::string const &traceback)
 
void utility::save_crash_report_to_console (char const *, std::string const &, int, std::string const &traceback)
 

Variables

static bool utility::show_crash_report_on_console_ = false
 
std::terminate_handler utility::old_terminate_handler_ = nullptr
 

Macro Definition Documentation

#define STRINGIFY (   x)    STRINGIFY_IMPL(x)

Referenced by get_extras().

#define STRINGIFY_IMPL (   x)    #x

Function Documentation

std::string get_extras ( )

References STRINGIFY.

Referenced by utility::save_crash_report_to_file().

static std::string const MODE ( "Debug"  )
static
static std::string const static COMPILER ("Unknown compiler") static std std::string const OS_VER ( "Unknown Operating System"  )
static