// =-=-=-=-=-=-=- // public - useful constructor error::error( std::string _msg, std::string _file, int _line, std::string _fcn, const error& _rhs ) : error(_rhs) { if (exception_) { exception_->add_message(_msg + ": " + build_result_string( _file, _line, _fcn )); return; } result_stack_.push_back(build_result_string(_file, _line, _fcn)); } // ctor
// =-=-=-=-=-=-=- // public - useful constructor error::error( bool _status, long long _code, std::string _msg, std::string _file, int _line, std::string _fcn ) : status_( _status ), code_( _code ), message_( _msg ) { // =-=-=-=-=-=-=- // cache message on message stack if ( !_msg.empty() ) { result_stack_.push_back( build_result_string( _file, _line, _fcn ) ); } } // ctor
// =-=-=-=-=-=-=- // public - useful constructor error::error( bool _status, long long _code, std::string _msg, std::string _file, int _line, std::string _fcn, const error& _rhs ) : status_( _status ), code_( _code ), message_( _msg ) { // =-=-=-=-=-=-=- // cache RHS vector into our vector first result_stack_ = _rhs.result_stack_; // =-=-=-=-=-=-=- // cache message on message stack result_stack_.push_back( build_result_string( _file, _line, _fcn ) ); } // ctor