Home

error_info_base Class Reference
[Error Management]

Defines objects for returning ACIS error information. More...

#include <err_info_base.hxx>

Inheritance diagram for error_info_base:

Inheritance graph
[legend]
Collaboration diagram for error_info_base:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void add ()
 Increments the use count.
 error_info_base (err_mess_type err_mess, spa_outcome_severity_type)
 C++ constructor to construct an error_info_base object specified by an error number and severity.
 error_info_base ()
 C++ default constructor to construct an error_info_base object.
char const * error_message () const
 Returns the message string of the error that this error_info_base object is encapsulating.
err_mess_type error_number () const
 Returns the error number of the error that this error_info_base object is encapsulating.
logical has_reasons () const
 Returns TRUE if this error_info_base object has at least one reason; returns FALSE otherwise.
void reasons (error_info_base_list &err_reasons) const
 Adds all the reasons of this error_info_base into the given list, err_reasons.
void remove ()
 Decrements the use count.
spa_outcome_severity_type severity () const
 Returns the severity of the error that this error_info_base object is encapsulating.
virtual int type () const
 Returns the id number for whichever class this object happens to be.

Static Public Member Functions

static int id ()
 Returns the id number for the class error_info_base.


Detailed Description

Defines objects for returning ACIS error information.


Role: Objects derived from this base class are used to return information in the outcome class. These objects are specifically designed so that following an error, API functions can automatically return additional information to the user, simply by changing the sys_error call. This class stores the error number, error severity, and reasons for the error. Every reason is an instance of error_info_base or of a class derived from error_info_base.

Although no restriction is placed on the information you may attach to error_info_base-derived objects, you should be aware that new ENTITYs will be lost during roll back, meaning that pointers to such objects will become stale. The derived error_info class handles this problem by returning only live entities via its get_entities_alive method.

See also:
spa_outcome_severity_type, error_info, error_info_list, error_info_base_list

Constructor & Destructor Documentation

error_info_base::error_info_base (  ) 

C++ default constructor to construct an error_info_base object.

error_info_base::error_info_base ( err_mess_type  err_mess,
spa_outcome_severity_type   
)

C++ constructor to construct an error_info_base object specified by an error number and severity.



Parameters:
err_mess err_mess_type indicating the error.
err_severity error severity


Member Function Documentation

void error_info_base::add (  ) 

Increments the use count.

Customers should only have to pay attention to use counting if they explicitly call add.

char const* error_info_base::error_message (  )  const

Returns the message string of the error that this error_info_base object is encapsulating.

err_mess_type error_info_base::error_number (  )  const

Returns the error number of the error that this error_info_base object is encapsulating.

logical error_info_base::has_reasons (  )  const

Returns TRUE if this error_info_base object has at least one reason; returns FALSE otherwise.

static int error_info_base::id (  )  [static]

void error_info_base::reasons ( error_info_base_list err_reasons  )  const

Adds all the reasons of this error_info_base into the given list, err_reasons.

In some cases, an error_info_base may need to provide some additional information about the errors or problems that would have caused the error that is indicated by this error_info_base object. These additional errors and problems are stored as reasons. For example, an error_info_base object encapsulating the error 'Operation failed due to check errors' might include the list of check errors in the 'reasons' list.

Parameters:
err_reasons error_info_base_list to which the reasons are added.

void error_info_base::remove (  ) 

Decrements the use count.

Customers should only have to pay attention to use counting if they explicitly call add.

spa_outcome_severity_type error_info_base::severity (  )  const

Returns the severity of the error that this error_info_base object is encapsulating.

virtual int error_info_base::type (  )  const [virtual]

Returns the id number for whichever class this object happens to be.

If this object is of the class error_info, then the id number returned by this function would be equal to the one returned by error_info::id.

Reimplemented in entity_error_info_legacy, rem_error_info, error_info, list_index_error_info, offset_error_info, curvature_error_info, and standard_error_info.