Loading...
Searching...
No Matches
error.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ledger::error_count
 

Namespaces

namespace  ledger
 

Macros

#define add_error_context(msg)
 
#define DECLARE_EXCEPTION(name, kind)
 
#define throw_(cls, msg)
 
#define warning_(msg)
 

Functions

string ledger::error_context ()
 
string ledger::file_context (const path &file, std::size_t line)
 
string ledger::line_context (const string &line, const string::size_type pos=0, const string::size_type end_pos=0)
 
string ledger::source_context (const path &file, const std::istream::pos_type pos, const std::istream::pos_type end_pos, const string &prefix="")
 
template<typename T >
void ledger::throw_func (const string &message)
 
void ledger::warning_func (const string &message)
 

Variables

std::ostringstream ledger::_ctxt_buffer
 
std::ostringstream ledger::_desc_buffer
 

Detailed Description

Author
John Wiegley

Definition in file error.h.

Macro Definition Documentation

◆ add_error_context

#define add_error_context ( msg)
Value:
((long(_ctxt_buffer.tellp()) == 0) ? \
(_ctxt_buffer << (msg)) : \
(_ctxt_buffer << std::endl << (msg)))

Definition at line 71 of file error.h.

Referenced by ledger::pass_down_posts< Iterator >::pass_down_posts().

◆ DECLARE_EXCEPTION

#define DECLARE_EXCEPTION ( name,
kind )
Value:
class name : public kind { \
public: \
explicit name(const string& why) throw() : kind(why) {} \
virtual ~name() throw() {} \
}

Definition at line 88 of file error.h.

◆ throw_

◆ warning_

#define warning_ ( msg)
Value:
((_desc_buffer << (msg)), \
warning_func(_desc_buffer.str()))

Definition at line 65 of file error.h.