#include <err_info.hxx>


Public Member Functions | |
| void | add () |
| Increments the use count. | |
| void | add_entities (const ENTITY_LIST &entities) |
Adds entities to this error_info, if not already there. | |
| void | add_entity (ENTITY *ent) |
Adds an entity to this error_info, if not already there. | |
| error_info (err_mess_type err_mess, spa_outcome_severity_type err_severity, ENTITY *ent1=NULL, ENTITY *ent2=NULL, ENTITY *ent3=NULL) | |
C++ constructor to construct an error_info object with the specified error number, error severity and a maximum of three entities. | |
| error_info (err_mess_type err_mess, spa_outcome_severity_type err_severity, const ENTITY_LIST &entities) | |
C++ constructor to construct an error_info object with the specified error number, error severity and a list of entities. | |
| error_info () | |
C++ default constructor to construct an error_info object with no entities in it. | |
| 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. | |
| i_aux_data_holder * | get_aux_data () const |
Queries the auxiliary data provided by this error_info object. | |
| void | get_entities_alive (ENTITY_LIST &entities) const |
Adds all the alive entities that belong to this error_info to the incoming list of ENTITYs. | |
| 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 | reasons (error_info_list &err_reasons) const |
Adds all the reasons of this error_info to 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. | |
| virtual | ~error_info () |
C++ destructor, deleting an error_info. | |
Static Public Member Functions | |
| static int | id () |
Returns the id number for the class error_info. | |
Role: This class is derived from error_info_base. In addition to holding the error number and severity associated with a problem, failure, or error encountered during an operation, instances of error_info are designed to hold pointers to an entity or entities involved in the failure. They can therefore be used by API functions that return entity-based information in their outcomes.
Error System process
1. At the start of each API function, a global variable pointer to an error_info_base object is set to NULL.
2. Before sys_error is called, the global pointer is set to contain the relevant error_info_base object.
3. At the end of the API function, before the outcome object is returned, the global variable is examined, and if nonempty, an error_info instance is added to the outcome.
Two overloaded versions of the function sys_error set a global pointer to an error_info object. One version is passed an error_info object, whereas the other creates a standard_error_info object when sys_error is passed one or two ENTITYs. The standard_error_info class is derived from error_info.
In the Local Operations, Remove Faces, and Shelling Components, the error_info object returns an ENTITY that further specifies where the local operation first fails, when such information is available. A standard_error_info object is adequate for use in these components, and more detailed information could be returned, if necessary, by deriving a new class.
| error_info::error_info | ( | ) |
C++ default constructor to construct an error_info object with no entities in it.
| error_info::error_info | ( | err_mess_type | err_mess, | |
| spa_outcome_severity_type | err_severity, | |||
| const ENTITY_LIST & | entities | |||
| ) |
C++ constructor to construct an error_info object with the specified error number, error severity and a list of entities.
| err_mess | err_mess_type indicating the error. | |
| err_severity | error severity | |
| entities | list of entities |
| error_info::error_info | ( | err_mess_type | err_mess, | |
| spa_outcome_severity_type | err_severity, | |||
| ENTITY * | ent1 = NULL, |
|||
| ENTITY * | ent2 = NULL, |
|||
| ENTITY * | ent3 = NULL | |||
| ) |
C++ constructor to construct an error_info object with the specified error number, error severity and a maximum of three entities.
| err_mess | err_mess_type indicating the error. | |
| err_severity | error severity | |
| ent1 | first entity | |
| ent2 | second entity | |
| ent3 | third entity |
| virtual error_info::~error_info | ( | ) | [virtual] |
C++ destructor, deleting an error_info.
| void error_info_base::add | ( | ) | [inherited] |
Increments the use count.
Customers should only have to pay attention to use counting if they explicitly call add.
| void error_info::add_entities | ( | const ENTITY_LIST & | entities | ) |
Adds entities to this error_info, if not already there.
Any dead entity in the given list would not get added.
| entities | ENTITY_LIST to add |
| void error_info::add_entity | ( | ENTITY * | ent | ) |
Adds an entity to this error_info, if not already there.
| ent | pointer to an ENTITY that is to be added. This should not point to a NULL or a dead entity. |
| char const* error_info_base::error_message | ( | ) | const [inherited] |
Returns the message string of the error that this error_info_base object is encapsulating.
| err_mess_type error_info_base::error_number | ( | ) | const [inherited] |
Returns the error number of the error that this error_info_base object is encapsulating.
| i_aux_data_holder* error_info::get_aux_data | ( | ) | const |
Queries the auxiliary data provided by this error_info object.
Returns NULL if no additional/auxiliary information is available. Note that the object (i.e., the i_aux_data_holder) returned by this function is owned by the caller and the memory needs to be cleaned up after use.
| void error_info::get_entities_alive | ( | ENTITY_LIST & | entities | ) | const |
Adds all the alive entities that belong to this error_info to the incoming list of ENTITYs.
Note that this method does not clear the given list of entities.
| entities | ENTITY_LIST to which the alive entities are added. |
| logical error_info_base::has_reasons | ( | ) | const [inherited] |
Returns TRUE if this error_info_base object has at least one reason; returns FALSE otherwise.
| static int error_info::id | ( | ) | [static] |
Returns the id number for the class error_info.
Reimplemented from error_info_base.
Reimplemented in entity_error_info_legacy, rem_error_info, list_index_error_info, offset_error_info, curvature_error_info, and standard_error_info.
| void error_info_base::reasons | ( | error_info_base_list & | err_reasons | ) | const [inherited] |
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.
| err_reasons | error_info_base_list to which the reasons are added. |
| void error_info::reasons | ( | error_info_list & | err_reasons | ) | const |
Adds all the reasons of this error_info to the given list, err_reasons.
In some cases, error_info 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 object. These additional errors and problems are stored as 'reasons'. For example, an error_info object encapsulating the error 'Operation failed due to check errors' might include the list of check errors in the 'reasons' list.
| err_reasons | error_info_list to which the reasons are added |
| void error_info_base::remove | ( | ) | [inherited] |
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 [inherited] |
Returns the severity of the error that this error_info_base object is encapsulating.
| virtual int error_info::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 method would be equal to the one returned by error_info::id.
Reimplemented from error_info_base.
Reimplemented in entity_error_info_legacy, rem_error_info, list_index_error_info, offset_error_info, curvature_error_info, and standard_error_info.