Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

eformat::TooBigCountIssue Class Reference

#include <TooBigCountIssue.h>

Inheritance diagram for eformat::TooBigCountIssue:

eformat::Issue eformat::Issue ers::Issue ers::Issue ers::Issue ers::Issue List of all members.

Public Member Functions

void add_qualifier (const std::string &qualif)
 adds a qualifier to the issue
void add_qualifier (const std::string &qualif)
 adds a qualifier to the issue
void cause (const std::exception *cause=0)
 Initialises the cause field.
const Issuecause () const throw ()
 return the cause Issue of this Issue
void cause (const std::exception *cause=0)
 Initialises the cause field.
const Issuecause () const throw ()
 return the cause Issue of this Issue
Issueclone () const
Issueclone () const
size_t count () const
size_t count () const
virtual int exit_value () const throw ()
 value to pass to exit
virtual int exit_value () const throw ()
 value to pass to exit
virtual const char * get_class_name () const throw ()
 Get key for class (used for serialisation).
virtual const char * get_class_name () const throw ()
 Get key for class (used for serialisation).
double get_double_value (const std::string key, double def) const throw ()
 Get a value of the table as double.
double get_double_value (const std::string key, double def) const throw ()
 Get a value of the table as double.
int get_int_value (const std::string &key, int def=0) const throw ()
 Get a value of the table as an integer.
int get_int_value (const std::string &key, int def=0) const throw ()
 Get a value of the table as an integer.
long get_long_value (const std::string &key, long def=0) const throw ()
 Get a value of the table as a long integer.
long get_long_value (const std::string &key, long def=0) const throw ()
 Get a value of the table as a long integer.
const std::string & get_value (const std::string &key) const throw ()
const std::string & get_value (const std::string &key, const std::string &def) const throw ()
 Reads the property list.
const std::string & get_value (const std::string &key) const throw ()
const std::string & get_value (const std::string &key, const std::string &def) const throw ()
 Reads the property list.
const string_map_typeget_value_table () const
 extract value table
const string_map_typeget_value_table () const
 extract value table
const std::string & human_description () const throw ()
 Human description message.
const std::string & human_description () const throw ()
 Human description message.
bool is_error ()
 is the issue an error (or fatal)
bool is_error ()
 is the issue an error (or fatal)
size_t max_count () const
size_t max_count () const
const std::string & message () const throw ()
 Message.
const std::string & message () const throw ()
 Message.
 operator std::string () const
 Converts the issue into a string.
 operator std::string () const
 Converts the issue into a string.
bool operator== (const Issue &other) const throw ()
 Equality operator.
bool operator== (const Issue &other) const throw ()
 Equality operator.
const std::string & operator[] (const std::string &key) const throw ()
const std::string & operator[] (const std::string &key) const throw ()
std::vector< std::string > qualifiers () const
 return array of qualifiers
std::vector< std::string > qualifiers () const
 return array of qualifiers
responsibility_t responsibility () const throw ()
 get the responsability level of the issue
void responsibility (responsibility_t r)
 set the responsability of the issue
responsibility_t responsibility () const throw ()
 get the responsability level of the issue
void responsibility (responsibility_t r)
 set the responsability of the issue
void set_value (const std::string &key, const void *ptr) throw ()
void set_value (const std::string &key, const char *value) throw ()
 Sets a value (c-string).
void set_value (const std::string &key, const std::string &value) throw ()
 Sets a value (string).
void set_value (const std::string &key, double value) throw ()
 Sets a value (double float).
void set_value (const std::string &key, int64_t value) throw ()
void set_value (const std::string &key, int32_t value) throw ()
void set_value (const std::string &key, int16_t value) throw ()
void set_value (const std::string &key, int8_t value) throw ()
void set_value (const std::string &key, uint64_t value) throw ()
void set_value (const std::string &key, uint32_t value) throw ()
void set_value (const std::string &key, uint16_t value) throw ()
void set_value (const std::string &key, uint8_t value) throw ()
 Sets a value 8 bit unsigned.
void set_value (const std::string &key, const void *ptr) throw ()
void set_value (const std::string &key, const char *value) throw ()
 Sets a value (c-string).
void set_value (const std::string &key, const std::string &value) throw ()
 Sets a value (string).
void set_value (const std::string &key, double value) throw ()
 Sets a value (double float).
void set_value (const std::string &key, int64_t value) throw ()
void set_value (const std::string &key, int32_t value) throw ()
void set_value (const std::string &key, int16_t value) throw ()
void set_value (const std::string &key, int8_t value) throw ()
void set_value (const std::string &key, uint64_t value) throw ()
void set_value (const std::string &key, uint32_t value) throw ()
void set_value (const std::string &key, uint16_t value) throw ()
void set_value (const std::string &key, uint8_t value) throw ()
 Sets a value 8 bit unsigned.
void severity (severity_t s)
 sets the severity_t of the issue
severity_t severity () const throw ()
 severity_t of the issue
void severity (severity_t s)
 sets the severity_t of the issue
severity_t severity () const throw ()
 severity_t of the issue
std::string severity_message () const
 message associated with the severity_t of the issue
std::string severity_message () const
 message associated with the severity_t of the issue
 TooBigCountIssue (const ers::Context &context, ers::severity_t severity, size_t count, size_t maxcount)
 TooBigCountIssue (const ers::Context &context, ers::severity_t severity, size_t count, size_t maxcount)
int transience () const throw ()
 is the issue transient
void transience (bool tr)
 sets if the issue is transient
int transience () const throw ()
 is the issue transient
void transience (bool tr)
 sets if the issue is transient
int values_number () const
 How many key / values.
int values_number () const
 How many key / values.
const char * what () const throw ()
 Human description message.
const char * what () const throw ()
 Human description message.
virtual ~TooBigCountIssue () throw ()
virtual ~TooBigCountIssue () throw ()

Static Public Attributes

const char *const CAUSE_PSEUDO_KEY
 key used when serializing the cause issue, this key is not used in the value table
const char *const CAUSE_PSEUDO_KEY = "CAUSE"
 key used when serializing the cause issue, this key is not used in the value table
const char *const CAUSE_TEXT_KEY
 key used to store the cause issue's message
const char *const CAUSE_TEXT_KEY = "CAUSE_TEXT"
 key used to store the cause issue's message
const char *const CLASS_KEY
 key for class information
const char *const CLASS_KEY = "ISSUE_CLASS"
 key for class information
const char *const COMPILATION_DEBUG_LVL_KEY
const char *const COMPILATION_DEBUG_LVL_KEY = "COMPILATION_DEBUG_LVL"
const char *const COMPILATION_TARGET_KEY
 key for compilation target
const char *const COMPILATION_TARGET_KEY = "COMPILATION_TARGET"
 key for compilation target
const char *const COMPILATION_TIME_KEY
 key for compilation time
const char *const COMPILATION_TIME_KEY = "COMPILATION_TIME"
 key for compilation time
const char *const COMPILER_KEY
 key for compilator type
const char *const COMPILER_KEY = "COMPILER"
 key for compilator type
const char *const CPP_CLASS_KEY
 key for c++ class (might be mangled)
const char *const CPP_CLASS_KEY = "ISSUE_CPP_CLASS"
 key for c++ class (might be mangled)
const char *const ERS_VERSION_KEY
 key for ERS version
const char *const ERS_VERSION_KEY = "ERS_VERSION"
 key for ERS version
const char *const EXIT_VALUE_KEY
 key used to store the exit value
const char *const EXIT_VALUE_KEY = "EXIT_VALUE"
 key used to store the exit value
const char *const HOST_IP_ADDR_KEY
 key for host ip address
const char *const HOST_IP_ADDR_KEY = "HOST_IP"
 key for host ip address
const char *const HOST_NAME_KEY
 key for hostname
const char *const HOST_NAME_KEY = "HOST_NAME"
 key for hostname
const char *const HOST_TYPE_KEY
 key for host type (architecture / os)
const char *const HOST_TYPE_KEY = "HOST_TYPE"
 key for host type (architecture / os)
const char *const ISSUE_CLASS_NAME
 name of the class, used for serialisation
const char *const ISSUE_CLASS_NAME = "ers::issue"
 name of the class, used for serialisation
const char *const MESSAGE_KEY
 key for human readable
const char *const MESSAGE_KEY = "MESSAGE"
 key for human readable
const char *const PROCESS_ID_KEY
 key for the process id (number)
const char *const PROCESS_ID_KEY = "PROCESS_ID"
 key for the process id (number)
const char *const PROCESS_PWD_KEY
 key for the process working directory
const char *const PROCESS_PWD_KEY = "PROCESS_PWD"
 key for the process working directory
const char *const PROGRAM_NAME_KEY
 key for the name of the program
const char *const PROGRAM_NAME_KEY = "PROGRAM_NAME"
 key for the name of the program
const char *const QUALIFIER_LIST_KEY
 key used to store the qualifier list
const char *const QUALIFIER_LIST_KEY = "QUALIFIERS"
 key used to store the qualifier list
const char *const RESPONSIBILITY_KEY
 key for the responsibility of the issue (text)
const char *const RESPONSIBILITY_KEY = "RESPONSIBILITY"
 key for the responsibility of the issue (text)
const char *const SEVERITY_KEY
 key for the severity_t of the issue
const char *const SEVERITY_KEY = "SEVERITY"
 key for the severity_t of the issue
const char *const SOURCE_PACKAGE_KEY
 package name associated with source code
const char *const SOURCE_PACKAGE_KEY = "SOURCE_PACKAGE"
 package name associated with source code
const char *const SOURCE_POSITION_KEY
 key for position in the source code
const char *const SOURCE_POSITION_KEY = "SOURCE_POSITION"
 key for position in the source code
const char *const TIME_KEY
 key for the time of the issue (text)
const char *const TIME_KEY = "TIME"
 key for the time of the issue (text)
const char *const TRANSIENCE_KEY
 key for the transience of the issue (text)
const char *const TRANSIENCE_KEY = "TRANSIENCE"
 key for the transience of the issue (text)
const char *const USER_ID_KEY
 key for the user-id of the owner of the process
const char *const USER_ID_KEY = "USER_ID"
 key for the user-id of the owner of the process
const char *const USER_NAME_KEY
 key for the user-name of the owner of the process
const char *const USER_NAME_KEY = "USER_NAME"
 key for the user-name of the owner of the process

Protected Member Functions

void finish_setup (const std::string &message) throw ()
 Finishes the setup of the Issue.
void finish_setup (const std::string &message) throw ()
 Finishes the setup of the Issue.
void insert (const Context *context) throw ()
 Inserts the context.
void insert (const Context *context) throw ()
 Inserts the context.
void insert_time () throw ()
 Inserts current time.
void insert_time () throw ()
 Inserts current time.
void set_values (const string_map_type &values) throw ()
 sets the value table
void set_values (const string_map_type &values) throw ()
 sets the value table
void setup_common (const Context *context) throw ()
 Sets up the common fields.
void setup_common (const Context *context) throw ()
 Sets up the common fields.

Protected Attributes

Issuem_cause
 Issue that caused the current issue.
Issuem_cause
 Issue that caused the current issue.
std::string m_class_name
 class name
std::string m_human_description
 Human readable description (cache).
string_map_type m_value_table
 Optional properties.

Detailed Description

This exception is supposed to be thrown when the user is trying to add more blocks than the number of blocks I can handle.


Constructor & Destructor Documentation

eformat::TooBigCountIssue::TooBigCountIssue const ers::Context context,
ers::severity_t  severity,
size_t  count,
size_t  maxcount
 

Builds a new size-check exception

Parameters:
context The Error Reporting System context to be used to identify the spot where this issue was created
severity The severity of this issue
count The number of blocks I was asked to deal with
maxcount The maximum number of blocks I can deal with
00024   : eformat::Issue(context,severity)
00025 {
00026   set_value(CURRENT_COUNT_KEY, count);
00027   set_value(MAX_COUNT_KEY, maxcount);
00028   finish_setup("Overloaded paged-memory container");
00029 }

virtual eformat::TooBigCountIssue::~TooBigCountIssue  )  throw () [inline, virtual]
 

Destructor virtualisation

00046 {}

eformat::TooBigCountIssue::TooBigCountIssue const ers::Context context,
ers::severity_t  severity,
size_t  count,
size_t  maxcount
 

Builds a new size-check exception

Parameters:
context The Error Reporting System context to be used to identify the spot where this issue was created
severity The severity of this issue
count The number of blocks I was asked to deal with
maxcount The maximum number of blocks I can deal with

virtual eformat::TooBigCountIssue::~TooBigCountIssue  )  throw () [inline, virtual]
 

Destructor virtualisation

00046 {}


Member Function Documentation

void ers::Issue::add_qualifier const std::string &  qualif  )  [inherited]
 

adds a qualifier to the issue

void Issue::add_qualifier const std::string &  qualif  )  [inherited]
 

adds a qualifier to the issue

Add a qualifier to the qualifier list

Parameters:
qualif the qualifier to add
00702                                                  {
00703     const std::string &qualif_s = get_value(QUALIFIER_LIST_KEY) ; 
00704     std::string::size_type pos = qualif_s.find(qualif);
00705     if (pos!=std::string::npos) return ; // already present
00706     std::string n_qualif = qualif_s+qualif + " " ; 
00707     set_value(QUALIFIER_LIST_KEY,n_qualif); 
00708 } // add_qualifier

void ers::Issue::cause const std::exception *  cause = 0  )  [inherited]
 

Initialises the cause field.

const Issue* ers::Issue::cause  )  const throw () [inherited]
 

return the cause Issue of this Issue

void Issue::cause const std::exception *  c = 0  )  [inherited]
 

Initialises the cause field.

Sets the cause of the issue If the cause is an Issue, it is cloned and stored in the m_cause pointer. In all cases, the description of the cause is stored in the value table using the CAUSE_TEXT_KEY key. If the cause pointer is null, the m_cause field is simply cleared.

Parameters:
c pointer to the cause exception
00251                                        {
00252     if (c==0) {
00253         m_cause = 0 ; 
00254         return ; 
00255     } // No cause easy. 
00256     const Issue *i = dynamic_cast<const Issue *>(c) ; 
00257     if (i) {
00258         m_cause = i->clone(); 
00259     } else {
00260         m_cause = 0 ; 
00261     } // if
00262     set_value(CAUSE_TEXT_KEY,c->what()); 
00263 } // cause

const Issue * Issue::cause  )  const throw () [inherited]
 

return the cause Issue of this Issue

Returns:
the cause of the issue, if there is one, a null pointer otherwise
00239                                         {
00240     return m_cause ; 
00241 } // cause

Issue* ers::Issue::clone  )  const [inherited]
 

Issue * Issue::clone  )  const [inherited]
 

Builds a clone of the object. The object is allocated on the stack, and should be deleted by the caller

Returns:
a new object that is a copy of the current object
00159                           { 
00160     return IssueFactory::instance()->build(this) ; 
00161 } // clone

size_t eformat::TooBigCountIssue::count  )  const
 

The number of blocks I have to deal with

size_t eformat::TooBigCountIssue::count  )  const
 

The number of blocks I have to deal with

00032 {
00033   return get_int_value(CURRENT_COUNT_KEY);
00034 }

virtual int ers::Issue::exit_value  )  const throw () [virtual, inherited]
 

value to pass to exit

int Issue::exit_value  )  const throw () [virtual, inherited]
 

value to pass to exit

00692                                     {
00693     int v = 1 ; 
00694     if (transience()==1) v = EX_TEMPFAIL ; 
00695     return get_int_value(EXIT_VALUE_KEY,v); 
00696 } // exit_value

void ers::Issue::finish_setup const std::string &  message  )  throw () [protected, inherited]
 

Finishes the setup of the Issue.

void Issue::finish_setup const std::string &  msg  )  throw () [protected, inherited]
 

Finishes the setup of the Issue.

Finishes the setting up of the information fields. In particular, in fills in the human message and the class type fields (those fields are not available until the end of the object construction.

Note:
this method should be called by the sub-class constructor, so that RTTI information is setup and correct.
Parameters:
message human readable message
Note:
All method used within this method should throw no exceptions to avoid circular problems.
00567                                                      {
00568     // set_value(CPP_CLASS_KEY,class_name); 
00569     set_value(CLASS_KEY, get_class_name()) ;
00570     set_value(MESSAGE_KEY,msg); 
00571 } // finish_setup

virtual const char* ers::Issue::get_class_name  )  const throw () [virtual, inherited]
 

Get key for class (used for serialisation).

Reimplemented in ers::Assertion, ers::DefaultIssue, ers::EntityNotFoundIssue, ers::InvalidReferenceIssue, ers::IssueFactoryIssue, ers::LogIssue, ers::NotImplemented, ers::ParseIssue, ers::Precondition, ers::RangeIssue, ExampleIssue, ers::Assertion, ers::DefaultIssue, ers::EntityNotFoundIssue, ers::InvalidReferenceIssue, ers::IssueFactoryIssue, ers::LogIssue, ers::NotImplemented, ers::ParseIssue, ers::Precondition, and ers::RangeIssue.

const char * Issue::get_class_name  )  const throw () [virtual, inherited]
 

Get key for class (used for serialisation).

Returns the key used to describe this particular class when serializing This method tries to build a meaningfull class name out of C++ RTTI. This depends on the compiler providing information in a format similar to gcc. For more safety. If the gcc unmangling fails the default (ers::Issue) is used.

Reimplemented in ers::Assertion, ers::DefaultIssue, ers::EntityNotFoundIssue, ers::InvalidReferenceIssue, ers::IssueFactoryIssue, ers::LogIssue, ers::NotImplemented, ers::ParseIssue, ers::Precondition, ers::RangeIssue, ExampleIssue, ers::Assertion, ers::DefaultIssue, ers::EntityNotFoundIssue, ers::InvalidReferenceIssue, ers::IssueFactoryIssue, ers::LogIssue, ers::NotImplemented, ers::ParseIssue, ers::Precondition, and ers::RangeIssue.

00586                                                 {
00587     if (m_class_name.empty()) {
00588         const Issue *p = this ;
00589         m_class_name = ers::Core::umangle_gcc_class_name((typeid(*p)).name()).c_str(); 
00590         if (m_class_name.empty()) {
00591              m_class_name=ISSUE_CLASS_NAME ; 
00592         } // fall back 
00593     } 
00594     return m_class_name.c_str() ;
00595 } // get_class_name

double ers::Issue::get_double_value const std::string  key,
double  def
const throw () [inherited]
 

Get a value of the table as double.

double Issue::get_double_value const std::string  key,
double  def = nan("")
const throw () [inherited]
 

Get a value of the table as double.

Get a property of an issue as an double

Parameters:
key the key to search for
def the value to return if key is not found - the default value for this parameter is NaN.
Returns:
value of key or def
00343                                                                                     {
00344     std::string v = get_value(key) ;      
00345     if (! v.empty()) { // not empty 
00346         std::istringstream in(v) ;
00347         double n ; 
00348         in >> n ;
00349         return n ; 
00350         // return atoi(v.c_str());
00351     } else { // empty 
00352         return def ; 
00353     } // empty     
00354 } // get_double_value

int ers::Issue::get_int_value const std::string &  key,
int  def = 0
const throw () [inherited]
 

Get a value of the table as an integer.

int Issue::get_int_value const std::string &  key,
int  def = 0
const throw () [inherited]
 

Get a value of the table as an integer.

Get a property of an issue as an integer

Parameters:
key the key to search for
def the value to return if key is not found
Returns:
value of key or def
00304                                                                     {
00305     std::string v = get_value(key) ;      
00306     if (! v.empty()) { // not empty 
00307         std::istringstream in(v) ;
00308         int n ; 
00309         in >> n ;
00310         return n ; 
00311         // return atoi(v.c_str());
00312     } else { // empty 
00313         return def ; 
00314     } // empty 
00315 } // get_int_value

long ers::Issue::get_long_value const std::string &  key,
long  def = 0
const throw () [inherited]
 

Get a value of the table as a long integer.

long Issue::get_long_value const std::string &  key,
long  def = 0
const throw () [inherited]
 

Get a value of the table as a long integer.

Get a property of an issue as an long

Parameters:
key the key to search for
def the value to return if key is not found
Returns:
value of key or def
00324                                                                        {
00325     std::string v = get_value(key) ;      
00326     if (! v.empty()) { // not empty 
00327         std::istringstream in(v) ;
00328         long n ; 
00329         in >> n ;
00330         return n ; 
00331         // return atoi(v.c_str());
00332     } else { // empty 
00333         return def ; 
00334     } // empty 
00335 } // get_long_value

const std::string& ers::Issue::get_value const std::string &  key  )  const throw () [inherited]
 

const std::string& ers::Issue::get_value const std::string &  key,
const std::string &  def
const throw () [inherited]
 

Reads the property list.

const std::string & Issue::get_value const std::string &  key  )  const throw () [inherited]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

00293                                                                     {
00294     return get_value(key,Core::empty_string) ; 
00295 } // get_value

const std::string & Issue::get_value const std::string &  key,
const std::string &  def
const throw () [inherited]
 

Reads the property list.

General method for querying properties of the Issue

Parameters:
key the key to lookup
Returns:
the string value for the key and empty string if the key is not found
00282                                                                                           {
00283     string_map_type::const_iterator pos = m_value_table.find(key);
00284     if (pos!=m_value_table.end()) {
00285         return pos->second ; 
00286     } // if
00287     return def ; 
00288 } // get_value

const string_map_type* ers::Issue::get_value_table  )  const [inherited]
 

extract value table

const string_map_type * Issue::get_value_table  )  const [inherited]
 

extract value table

Returns a read-only pointer to the value table

Returns:
read only pointer to the table
00273                                                     {
00274     return &m_value_table ; 
00275 } // get_value_table

const std::string& ers::Issue::human_description  )  const throw () [inherited]
 

Human description message.

const std::string & Issue::human_description  )  const throw () [inherited]
 

Human description message.

Returns:
human description of the Issue
00671                                                          {
00672     if (m_human_description.empty()) {
00673          m_human_description = HumanStream::to_string(this) ; 
00674     } 
00675     return m_human_description ; 
00676 }  // human_description

void ers::Issue::insert const Context context  )  throw () [protected, inherited]
 

Inserts the context.

void Issue::insert const Context context  )  throw () [protected, inherited]
 

Inserts the context.

Inserts the context of the issue into the issue

Parameters:
context pointer to context object
00480                                                  {
00481     if (context) {
00482         set_value(SOURCE_POSITION_KEY,context->position()) ; 
00483         set_value(SOURCE_PACKAGE_KEY,context->package_name()); 
00484         set_value(COMPILER_KEY,context->compiler()) ; 
00485         set_value(COMPILATION_TIME_KEY,context->compilation()) ; 
00486         set_value(COMPILATION_TARGET_KEY,context->host_type()) ; 
00487         int lvl = ers::Context::debug_level();
00488         if (lvl>=0) {
00489             set_value(COMPILATION_DEBUG_LVL_KEY,lvl); 
00490         } // if
00491         int frame_number = context->stack_frames();
00492         for(int i=0;i<frame_number;i++) {
00493             char key_buffer[256] ; 
00494             snprintf(key_buffer,sizeof(key_buffer),"SOURCE-STACK-%03x",i);
00495             set_value(key_buffer,context->stack_frame(i)); 
00496         } // for
00497         std::vector<std::string> qualifs = context->qualifiers() ;
00498         std::vector<std::string>::const_iterator pos ; 
00499         for(pos=qualifs.begin();pos!=qualifs.end();pos++) {
00500             add_qualifier(*pos) ; 
00501         } // for
00502     } // if context 
00503 } // insert

void ers::Issue::insert_time  )  throw () [protected, inherited]
 

Inserts current time.

void Issue::insert_time  )  throw () [protected, inherited]
 

Inserts current time.

Inserts the current time into the issue

00508                                 {
00509     time_t now ;
00510     time(&now); 
00511     char time_buffer[BUFFER_SIZE] ; 
00512     ctime_r(&now,time_buffer) ; 
00513     char *cr = strchr(time_buffer,'\n');
00514     if (cr) {
00515         *cr = '\0' ;
00516     } // carriage return 
00517     set_value(TIME_KEY,time_buffer); 
00518 } // insert_time

bool ers::Issue::is_error  )  [inherited]
 

is the issue an error (or fatal)

bool Issue::is_error  )  [inherited]
 

is the issue an error (or fatal)

Is the issue either an error or a fatal error

Returns:
true if the issue is either an error or a fatal
00618                      {
00619     severity_t s = severity(); 
00620     return (s==ers::error || s== ers::fatal) ;
00621 } // is_error

size_t eformat::TooBigCountIssue::max_count  )  const
 

The maximum number of blocks I can deal with

size_t eformat::TooBigCountIssue::max_count  )  const
 

The maximum number of blocks I can deal with

00037 {
00038   return get_int_value(MAX_COUNT_KEY);
00039 }

const std::string& ers::Issue::message  )  const throw () [inherited]
 

Message.

const std::string & Issue::message  )  const throw () [inherited]
 

Message.

00688                                               {
00689     return get_value(MESSAGE_KEY) ; 
00690 } // message

ers::Issue::operator std::string  )  const [inherited]
 

Converts the issue into a string.

Issue::operator std::string  )  const [inherited]
 

Converts the issue into a string.

00164                                 {
00165     std::string s = human_description();
00166     return s ;
00167 } // std::string()

bool ers::Issue::operator== const Issue other  )  const throw () [inherited]
 

Equality operator.

bool Issue::operator== const Issue other  )  const throw () [inherited]
 

Equality operator.

Comparison operator

Parameters:
other issue to compare to
Returns:
true if this and other are equal
00185                                                        {
00186     if (m_value_table != other.m_value_table) return false ; 
00187     if (m_cause == other.m_cause) return true ; 
00188     return (*m_cause) == *(other.m_cause) ; 
00189 } // operator==

const std::string& ers::Issue::operator[] const std::string &  key  )  const throw () [inherited]
 

const std::string & Issue::operator[] const std::string &  key  )  const throw () [inherited]
 

Array access operator

Parameters:
key the resolve
Returns:
string containing value
See also:
get_value(const std::string &)
00197                                                                       {
00198     return get_value(key,"");
00199 } // operator[]

std::vector<std::string> ers::Issue::qualifiers  )  const [inherited]
 

return array of qualifiers

std::vector< std::string > Issue::qualifiers  )  const [inherited]
 

return array of qualifiers

Gets the list of qualifiers

Returns:
list of qualifiers
00714                                              {
00715     const std::string &qualif_s = get_value(QUALIFIER_LIST_KEY) ; 
00716     return ers::Core::tokenize(qualif_s,", \t"); 
00717 } // qualifiers

responsibility_t ers::Issue::responsibility  )  const throw () [inherited]
 

get the responsability level of the issue

void ers::Issue::responsibility responsibility_t  r  )  [inherited]
 

set the responsability of the issue

responsibility_t Issue::responsibility  )  const throw () [inherited]
 

get the responsability level of the issue

Gets the responsibility type of the Issue

Returns:
the responsibiliy value of the Issue
00636                                                       {
00637     std::string value = this->get_value(RESPONSIBILITY_KEY); 
00638     return ers::Core::parse_responsibility(value);
00639 } // responsability

void Issue::responsibility responsibility_t  r  )  [inherited]
 

set the responsability of the issue

Sets the responsbility of the Issue

Parameters:
r the responsibility type
00645                                               {
00646     set_value(RESPONSIBILITY_KEY,ers::Core::to_string(r)) ; 
00647 } // responsability

void ers::Issue::set_value const std::string &  key,
const void *  ptr
throw () [inherited]
 

void ers::Issue::set_value const std::string &  key,
const char *  value
throw () [inherited]
 

Sets a value (c-string).

void ers::Issue::set_value const std::string &  key,
const std::string &  value
throw () [inherited]
 

Sets a value (string).

void ers::Issue::set_value const std::string &  key,
double  value
throw () [inherited]
 

Sets a value (double float).

void ers::Issue::set_value const std::string &  key,
int64_t  value
throw () [inherited]
 

void ers::Issue::set_value const std::string &  key,
int32_t  value
throw () [inherited]
 

void ers::Issue::set_value const std::string &  key,
int16_t  value
throw () [inherited]
 

void ers::Issue::set_value const std::string &  key,
int8_t  value
throw () [inherited]
 

void ers::Issue::set_value const std::string &  key,
uint64_t  value
throw () [inherited]
 

void ers::Issue::set_value const std::string &  key,
uint32_t  value
throw () [inherited]
 

void ers::Issue::set_value const std::string &  key,
uint16_t  value
throw () [inherited]
 

void ers::Issue::set_value const std::string &  key,
uint8_t  value
throw () [inherited]
 

Sets a value 8 bit unsigned.

void Issue::set_value const std::string &  key,
const void *  ptr
throw () [inherited]
 

Sets a pointer in the value table

Parameters:
key the key to use for insertion
ptr a pointer
Note:
the pointer is stored in hex format
00456                                                                    {
00457     std::ostringstream stream ;
00458     stream.setf(std::ios::hex,std::ios::basefield); 
00459     stream << (unsigned long) ptr ; 
00460     m_value_table[key] = stream.str();
00461 } // set_value

void Issue::set_value const std::string &  key,
const char *  value
throw () [inherited]
 

Sets a value (c-string).

Sets a string value in the value table

Parameters:
key the key to use for insertion
value c-string, null pointer is ignored.
00443                                                                      {
00444     if (value) {
00445         std::string value_str = std::string(value) ; 
00446         set_value(key,value_str); 
00447     } // if 
00448 } // set_value

void Issue::set_value const std::string &  key,
const std::string &  value
throw () [inherited]
 

Sets a value (string).

Sets a string value in the value table

Parameters:
key the key to use for insertion
value the value to insert
00432                                                                           {
00433     if (! value.empty()) {
00434         m_value_table[key] = value ;
00435     }
00436 } // set_value

void Issue::set_value const std::string &  key,
double  value
throw () [inherited]
 

Sets a value (double float).

Set a numerical value in the value table

Parameters:
key the key to use for insertion
value the value to insert
00421                                                                 {
00422     std::ostringstream stream ;
00423     stream << value ; 
00424     m_value_table[key] = stream.str();
00425 } // set_value

void Issue::set_value const std::string &  key,
int64_t  value
throw () [inherited]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

00412                                                                  {
00413     ISSUE_VALUE_SET_SCALAR(m_value_table,key,value); 
00414 } // set_value

void Issue::set_value const std::string &  key,
int32_t  value
throw () [inherited]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

00406                                                                  {
00407     ISSUE_VALUE_SET_SCALAR(m_value_table,key,value); 
00408 } // set_value

void Issue::set_value const std::string &  key,
int16_t  value
throw () [inherited]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

00400                                                                  {
00401     ISSUE_VALUE_SET_SCALAR(m_value_table,key,value); 
00402 } // set_value

void Issue::set_value const std::string &  key,
int8_t  value
throw () [inherited]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

00394                                                                 {
00395     ISSUE_VALUE_SET_SCALAR(m_value_table,key,value); 
00396 } // set_value

void Issue::set_value const std::string &  key,
uint64_t  value
throw () [inherited]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

00388                                                                   {
00389     ISSUE_VALUE_SET_SCALAR(m_value_table,key,value); 
00390 } // set_value

void Issue::set_value const std::string &  key,
uint32_t  value
throw () [inherited]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

00382                                                                   {
00383     ISSUE_VALUE_SET_SCALAR(m_value_table,key,value); 
00384 } // set_value

void Issue::set_value const std::string &  key,
uint16_t  value
throw () [inherited]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

00376                                                                   {
00377     ISSUE_VALUE_SET_SCALAR(m_value_table,key,value); 
00378 } // set_value

void Issue::set_value const std::string &  key,
uint8_t  value
throw () [inherited]
 

Sets a value 8 bit unsigned.

Set a numerical value in the value table

Parameters:
key the key to use for insertion
value the value to insert
00370                                                                  {
00371     ISSUE_VALUE_SET_SCALAR(m_value_table,key,value); 
00372 } // set_value

void ers::Issue::set_values const string_map_type values  )  throw () [protected, inherited]
 

sets the value table

void Issue::set_values const string_map_type values  )  throw () [protected, inherited]
 

sets the value table

Sets the value table

Parameters:
values the value table to load
00361                                                             {
00362     m_value_table = values ;
00363 } // load_values

void ers::Issue::setup_common const Context context  )  throw () [protected, inherited]
 

Sets up the common fields.

void Issue::setup_common const Context context  )  throw () [protected, inherited]
 

Sets up the common fields.

This method sets up common fields for all Issues. In particular, it inserts all data concerning the Issue's context, this includes

  • Source code position (file/line)
  • Compiler version
  • Compilation time and date
Parameters:
context context where the exception occured, this should be the ERS_HERE macro.
Note:
All method used within this method should throw no exceptions to avoid circular problems.
00534                                                        {
00535     const int errno_copy = errno ; // We need to save errno, because it might be changed 
00536     insert(context);
00537     insert_time();
00538     errno = errno_copy ; // we restaure errno 
00539 } // setup_common

void ers::Issue::severity severity_t  s  )  [inherited]
 

sets the severity_t of the issue

severity_t ers::Issue::severity  )  const throw () [inherited]
 

severity_t of the issue

void Issue::severity severity_t  s  )  [inherited]
 

sets the severity_t of the issue

Set the severity_t of the Issue

Parameters:
s the severity_t level
00610                                  {
00611     set_value(SEVERITY_KEY,ers::Core::to_string(s)); 
00612 } // severity

severity_t Issue::severity  )  const throw () [inherited]
 

severity_t of the issue

Gets the severity_t of the Issue

Returns:
severity_t of the Issue
00601                                          {
00602     std::string value = get_value(SEVERITY_KEY); 
00603     return ers::Core::parse_severity(value);
00604 } // severity

std::string ers::Issue::severity_message  )  const [inherited]
 

message associated with the severity_t of the issue

std::string Issue::severity_message  )  const [inherited]
 

message associated with the severity_t of the issue

Returns:
the string representing the severity_t of the issue
00627                                         {
00628     return get_value(SEVERITY_KEY);  
00629 } // severity_message

int ers::Issue::transience  )  const throw () [inherited]
 

is the issue transient

void ers::Issue::transience bool  tr  )  [inherited]
 

sets if the issue is transient

int Issue::transience  )  const throw () [inherited]
 

is the issue transient

Returns:
the transience of the issue, 1 = true, 0 = false, -1 = unknown
00661                                      {
00662     std::string value = this->get_value(TRANSIENCE_KEY); 
00663     return ers::Core::parse_boolean(value.c_str());
00664 } // transience

void Issue::transience bool  tr  )  [inherited]
 

sets if the issue is transient

Sets the transience of the issue

Parameters:
tr true if the issue is transient, false if not
00654                               {
00655     set_value(TRANSIENCE_KEY,ers::Core::to_string(tr)) ; 
00656 } // transience

int ers::Issue::values_number  )  const [inherited]
 

How many key / values.

int Issue::values_number  )  const [inherited]
 

How many key / values.

Returns:
the number of key/value pairs in the issue
00468                                {
00469     return m_value_table.size(); 
00470 } // values_number

const char* ers::Issue::what  )  const throw () [inherited]
 

Human description message.

const char * Issue::what  )  const throw () [inherited]
 

Human description message.

This method overides the what method of the std::exception class. As this method is declared const, it has to use a pre-calculated string

Returns:
C style string of human_description
00683                                       {
00684     std::string desr = human_description() ; 
00685     return desr.c_str(); 
00686 } // what();  


Member Data Documentation

const char* const ers::Issue::CAUSE_PSEUDO_KEY [static, inherited]
 

key used when serializing the cause issue, this key is not used in the value table

const char *const Issue::CAUSE_PSEUDO_KEY = "CAUSE" [static, inherited]
 

key used when serializing the cause issue, this key is not used in the value table

const char* const ers::Issue::CAUSE_TEXT_KEY [static, inherited]
 

key used to store the cause issue's message

const char *const Issue::CAUSE_TEXT_KEY = "CAUSE_TEXT" [static, inherited]
 

key used to store the cause issue's message

const char* const ers::Issue::CLASS_KEY [static, inherited]
 

key for class information

const char *const Issue::CLASS_KEY = "ISSUE_CLASS" [static, inherited]
 

key for class information

const char* const ers::Issue::COMPILATION_DEBUG_LVL_KEY [static, inherited]
 

const char *const Issue::COMPILATION_DEBUG_LVL_KEY = "COMPILATION_DEBUG_LVL" [static, inherited]
 

const char* const ers::Issue::COMPILATION_TARGET_KEY [static, inherited]
 

key for compilation target

const char *const Issue::COMPILATION_TARGET_KEY = "COMPILATION_TARGET" [static, inherited]
 

key for compilation target

const char* const ers::Issue::COMPILATION_TIME_KEY [static, inherited]
 

key for compilation time

const char *const Issue::COMPILATION_TIME_KEY = "COMPILATION_TIME" [static, inherited]
 

key for compilation time

const char* const ers::Issue::COMPILER_KEY [static, inherited]
 

key for compilator type

const char *const Issue::COMPILER_KEY = "COMPILER" [static, inherited]
 

key for compilator type

const char* const ers::Issue::CPP_CLASS_KEY [static, inherited]
 

key for c++ class (might be mangled)

const char *const Issue::CPP_CLASS_KEY = "ISSUE_CPP_CLASS" [static, inherited]
 

key for c++ class (might be mangled)

const char* const ers::Issue::ERS_VERSION_KEY [static, inherited]
 

key for ERS version

const char *const Issue::ERS_VERSION_KEY = "ERS_VERSION" [static, inherited]
 

key for ERS version

const char* const ers::Issue::EXIT_VALUE_KEY [static, inherited]
 

key used to store the exit value

const char *const Issue::EXIT_VALUE_KEY = "EXIT_VALUE" [static, inherited]
 

key used to store the exit value

const char* const ers::Issue::HOST_IP_ADDR_KEY [static, inherited]
 

key for host ip address

const char *const Issue::HOST_IP_ADDR_KEY = "HOST_IP" [static, inherited]
 

key for host ip address

const char* const ers::Issue::HOST_NAME_KEY [static, inherited]
 

key for hostname

const char *const Issue::HOST_NAME_KEY = "HOST_NAME" [static, inherited]
 

key for hostname

const char* const ers::Issue::HOST_TYPE_KEY [static, inherited]
 

key for host type (architecture / os)

const char *const Issue::HOST_TYPE_KEY = "HOST_TYPE" [static, inherited]
 

key for host type (architecture / os)

const char* const ers::Issue::ISSUE_CLASS_NAME [static, inherited]
 

name of the class, used for serialisation

const char *const Issue::ISSUE_CLASS_NAME = "ers::issue" [static, inherited]
 

name of the class, used for serialisation

Issue* ers::Issue::m_cause [protected, inherited]
 

Issue that caused the current issue.

Issue* ers::Issue::m_cause [protected, inherited]
 

Issue that caused the current issue.

std::string ers::Issue::m_class_name [mutable, protected, inherited]
 

class name

std::string ers::Issue::m_human_description [mutable, protected, inherited]
 

Human readable description (cache).

string_map_type ers::Issue::m_value_table [protected, inherited]
 

Optional properties.

const char* const ers::Issue::MESSAGE_KEY [static, inherited]
 

key for human readable

const char *const Issue::MESSAGE_KEY = "MESSAGE" [static, inherited]
 

key for human readable

const char* const ers::Issue::PROCESS_ID_KEY [static, inherited]
 

key for the process id (number)

const char *const Issue::PROCESS_ID_KEY = "PROCESS_ID" [static, inherited]
 

key for the process id (number)

const char* const ers::Issue::PROCESS_PWD_KEY [static, inherited]
 

key for the process working directory

const char *const Issue::PROCESS_PWD_KEY = "PROCESS_PWD" [static, inherited]
 

key for the process working directory

const char* const ers::Issue::PROGRAM_NAME_KEY [static, inherited]
 

key for the name of the program

const char *const Issue::PROGRAM_NAME_KEY = "PROGRAM_NAME" [static, inherited]
 

key for the name of the program

const char* const ers::Issue::QUALIFIER_LIST_KEY [static, inherited]
 

key used to store the qualifier list

Ê

const char *const Issue::QUALIFIER_LIST_KEY = "QUALIFIERS" [static, inherited]
 

key used to store the qualifier list

Ê

const char* const ers::Issue::RESPONSIBILITY_KEY [static, inherited]
 

key for the responsibility of the issue (text)

const char *const Issue::RESPONSIBILITY_KEY = "RESPONSIBILITY" [static, inherited]
 

key for the responsibility of the issue (text)

const char* const ers::Issue::SEVERITY_KEY [static, inherited]
 

key for the severity_t of the issue

const char *const Issue::SEVERITY_KEY = "SEVERITY" [static, inherited]
 

key for the severity_t of the issue

const char* const ers::Issue::SOURCE_PACKAGE_KEY [static, inherited]
 

package name associated with source code

const char *const Issue::SOURCE_PACKAGE_KEY = "SOURCE_PACKAGE" [static, inherited]
 

package name associated with source code

const char* const ers::Issue::SOURCE_POSITION_KEY [static, inherited]
 

key for position in the source code

 

const char *const Issue::SOURCE_POSITION_KEY = "SOURCE_POSITION" [static, inherited]
 

key for position in the source code

 

const char* const ers::Issue::TIME_KEY [static, inherited]
 

key for the time of the issue (text)

const char *const Issue::TIME_KEY = "TIME" [static, inherited]
 

key for the time of the issue (text)

const char* const ers::Issue::TRANSIENCE_KEY [static, inherited]
 

key for the transience of the issue (text)

const char *const Issue::TRANSIENCE_KEY = "TRANSIENCE" [static, inherited]
 

key for the transience of the issue (text)

const char* const ers::Issue::USER_ID_KEY [static, inherited]
 

key for the user-id of the owner of the process

const char *const Issue::USER_ID_KEY = "USER_ID" [static, inherited]
 

key for the user-id of the owner of the process

const char* const ers::Issue::USER_NAME_KEY [static, inherited]
 

key for the user-name of the owner of the process

const char *const Issue::USER_NAME_KEY = "USER_NAME" [static, inherited]
 

key for the user-name of the owner of the process


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 19:18:26 2011 for BOSS6.5.5 by  doxygen 1.3.9.1