72 const std::string &compiler_name,
const std::string &compiler_version,
73 const std::string &compilation_time,
const std::string &compilation_date,
74 const std::string &package_name) {
75 this->m_file_name = filename ;
76 this->m_line_number = line_number ;
77 this->m_function_name = function_name ;
78 this->m_compiler_name = compiler_name ;
79 this->m_compiler_version = compiler_version ;
80 this->m_compilation_date = compilation_date ;
81 this->m_compilation_time = compilation_time ;
82 this->m_package_name = package_name ;
83#if defined(__GNU_LIBRARY__)
85 const int n_size = backtrace (array,128) ;
86 char ** symbols = backtrace_symbols(array, n_size);
87 for (
int i = 1; i < n_size; i++) {
88 this->m_stack_frames.push_back(symbols[i]);
125 if (m_position.empty()) {
126 std::ostringstream position_s ;
127 if (! m_package_name.empty()) {
128 position_s << m_package_name <<
":" ;
130 if (! m_file_name.empty()) {
131 const std::string::size_type p = m_file_name.rfind(
'/') ;
132 if (std::string::npos == p) {
133 position_s << m_file_name ;
135 position_s << (m_file_name.substr(p+1)) ;
137 position_s <<
":" << m_line_number <<
" ";
139 if (! m_function_name.empty()) {
140 position_s <<
"(" << m_function_name <<
")" ;
142 m_position = position_s.str();
169 if (m_compilation.empty()) {
170 std::ostringstream compilation_s ;
171 if (! m_compilation_time.empty()) {
172 compilation_s << m_compilation_time <<
" " ;
174 if (! m_compilation_date.empty()) {
175 compilation_s << m_compilation_date ;
177 m_compilation = compilation_s.str();
179 return m_compilation ;
Source context for Issue.
static std::string s_host_type
static const Context * empty()
const std::string & package_name() const
const std::string & stack_frame(int i) const
std::vector< std::string > qualifiers() const
const std::string & compiler() const
static void build_host_type()
static std::vector< std::string > default_qualifiers
const std::string & compilation() const
static void add_qualifier(const std::string &qualif)
const std::string & position() const
static std::string & host_type()
type of target host
Context(const std::string &filename, int line_number, const std::string &function_name, const std::string &compiler_name, const std::string &compiler_version, const std::string &compilation_time, const std::string &compilation_date, const std::string &package)
const std::string & file() const
const std::string & function() const
static Context * empty_instance