|
Classes | |
| class | entity_error_info_legacy |
| class | error_info |
| Class for storing entity-based ACIS error information. More... | |
| class | error_info_base |
| Defines objects for returning ACIS error information. More... | |
| class | error_info_base_list |
Acts as a collection class for error_info_base objects, that is, it implements a variable length list of error_info_base objects. More... | |
| class | error_info_list |
Acts as a collection class for error_info objects, that is, it implements a variable length list of error_info objects. More... | |
| class | error_list_info |
Chains a list of error_info_base objects together. More... | |
| class | i_aux_data_holder |
| Interface to hold heterogenous data with appropriate descriptions. More... | |
| class | i_data_element |
| Interface to a data element. More... | |
| class | i_data_set |
| Interface to a set of data elements. More... | |
| class | i_data_set_list |
| Interface to a list of data sets. More... | |
| class | list_index_error_info |
| Class for storing list-based ACIS error information. More... | |
| struct | message_list |
| Message list item. More... | |
| class | message_module |
| Contains all messages for a module. More... | |
| class | readonly_error_info_base_list |
Acts as a collection class for error_info_base objects, that is, it implements a variable length list of error_info_base objects. More... | |
| class | standard_error_info |
| Encapsulates standard error information. More... | |
Defines | |
| #define | EXCEPTION_BEGIN |
| Exception block begin. | |
| #define | EXCEPTION_CATCH(always_clean) |
| Exception catch. | |
| #define | EXCEPTION_CATCH_FALSE |
| Exception block end. | |
| #define | EXCEPTION_CATCH_TRUE |
| Exception block end. | |
| #define | EXCEPTION_END |
| Exception block end. | |
| #define | EXCEPTION_END_NO_RESIGNAL |
| Exception block end. | |
| #define | EXCEPTION_TRY |
| Exception try. | |
Typedefs | |
| typedef int | err_mess_type |
| An integral value used by the ACIS message and error system to signify a message code. | |
| typedef int | err_mess_type |
| An integer identifier that maps to a string. | |
Enumerations | |
| enum | spa_outcome_severity_type |
Enum for specifying different severities of an error that is represented by an error_info object. More... | |
Functions | |
| outcome | api_checking (logical on_off) |
| Sets the pointer argument checking for an API call to on or off. | |
| error_list_info * | append_error_list_info (error_list_info *list1, error_list_info *list2) |
| Concatenates two lists. | |
| void | check_outcome (const outcome &result) |
| Check an outcome from an API and signal an exception if it is not OK. | |
| void | err_mess_type_filtered_list (const error_info_list &raw_eil, err_mess_type err_num, error_info_list &filtered_eil) |
This function will add to filtered_eil only those error_info objects from the given raw_eil that are of the given type. | |
| void | err_mess_type_filtered_list (const error_info_base_list &raw_eil, err_mess_type err_num, error_info_base_list &filtered_eil) |
This function will add to filtered_eil only those error_info_base objects from the given raw_eil that are of the given type. | |
| void | error_begin () |
| Establishes ACIS signal handling. | |
| void | error_end () |
| Resets signal handling. | |
| void | error_harden () |
| Inhibits processing of user interrupts. | |
| void | error_soften () |
| Enables processing of user interrupts. | |
| char const * | find_err_ident (err_mess_type err_num) |
| Returns the identifier string for an error number. | |
| char const * | find_err_mess (err_mess_type err_num) |
| Gets the message string for an error number. | |
| char const * | find_err_module (err_mess_type err_num) |
| Translates the error number to a string containing the name of the module associated with the given error number. | |
| error_list_info * | find_error_list_info (error_list_info *list, int typeno) |
Searches the given error_list_info list for the first entry of the given type (or NULL if none). | |
| int | get_error_info_entity_id_count (const error_info_base *eib) |
Gets the count of entity IDs, dead or alive, that are referred to by the given error_info object. | |
| int | get_warnings (err_mess_type *&warning_list) |
| Obtains the warnings list. | |
| void | init_warnings () |
| Resets the number of warnings to 0. | |
| void | print_warnerr_mess (char const *msg, err_mess_type err_num, FILE *fptr) |
| Prints the message associated with the current error number in a simple format for debugging purposes. | |
| void | set_default_exception_control (logical set_default=TRUE) |
| Enables or disables exceptions when floating point errors occur. | |
| const char * | set_message (err_mess_type err_num, const char *err_mess) |
| Replace an error message with a custom message in the message_module system. | |
| void | sys_error (err_mess_type mess_num, error_info_base *e_info) |
| Signals ACIS errors and interrupts. | |
| void | sys_error (err_mess_type mess_num) |
| Signals ACIS errors and interrupts. | |
| void | sys_warning (err_mess_type mess_num) |
| Signals an ACIS warning. | |
| #define EXCEPTION_BEGIN |
Value:
{ \
err_mess_type resignal_no = 0; \
acis_exception error_info_holder(0); \
error_info_base* error_info_base_ptr = NULL; \
{ \
exception_save exception_save_mark;
| #define EXCEPTION_CATCH | ( | always_clean | ) |
Value:
; \
} catch (acis_exception ex) { \
resignal_no = error_no = ex.mess; \
error_info_base_ptr = error_info_holder.set_info(ex.info, __FILE__,__LINE__); \
} \
} \
if((always_clean) || error_no != 0) \
{ \
try {
| always_clean | When true, always stops here, regardless of no error ocurring. |
include <errorbase.hxx>
| #define EXCEPTION_CATCH_FALSE |
Value:
; \
} catch (acis_exception ex) { \
resignal_no = error_no = ex.mess; \
error_info_base_ptr = error_info_holder.set_info(ex.info, __FILE__,__LINE__); \
} \
} \
if(error_no) \
{ \
try {
Catch only if exception thrown.
include <errorbase.hxx>
| #define EXCEPTION_CATCH_TRUE |
Value:
; \
} catch (acis_exception ex) { \
resignal_no = error_no = ex.mess; \
error_info_base_ptr = error_info_holder.set_info(ex.info, __FILE__,__LINE__); \
} \
} \
{ \
try {
Always catch, regardless of exception or not.
include <errorbase.hxx>
| #define EXCEPTION_END |
Value:
} catch(acis_exception ex) { \ if( resignal_no == 0 ) { \ resignal_no = error_no = ex.mess; \ error_info_base_ptr = error_info_holder.set_info(ex.info, __FILE__,__LINE__); \ } \ } \ } \ } \ } \ if (resignal_no != 0 || acis_interrupted()) \ sys_error( resignal_no,error_info_base_ptr); \ }
| #define EXCEPTION_END_NO_RESIGNAL |
Value:
} catch(acis_exception ex) { \ if( resignal_no == 0 ) { \ resignal_no = error_no = ex.mess; \ error_info_base_ptr = error_info_holder.set_info(ex.info, __FILE__,__LINE__); \ } \ } \ } \ } \ } \ if( acis_interrupted()) \ sys_error( resignal_no,error_info_base_ptr); \ }
Does not rethrow exception.
include <errorbase.hxx>
| #define EXCEPTION_TRY |
Value:
exception_save_mark.begin(); \
get_error_mark().buffer_init = TRUE; \
err_mess_type error_no = setjmp( get_error_mark().buffer ); \
{ \
if( error_no != 0 ) { \
resignal_no = error_no; \
} \
else \
{ \
try {
| typedef int err_mess_type |
An integral value used by the ACIS message and error system to signify a message code.
This is typically seen used with sys_warning, sys_error, and the message module system.
include <errmsg.hxx>
| typedef int err_mess_type |
An integer identifier that maps to a string.
Role: This is the type passed to sys_error and sys_warning to signify a particular error.
include <err_info_base.hxx>
Enum for specifying different severities of an error that is represented by an error_info object.
SPA_OUTCOME_FATAL | Represents a fatal error, which would cause the operation that encountered the error to roll back. An API function should only add a single error_info with severity SPA_OUTCOME_FATAL, since the first one encountered causes the API function to roll. |
SPA_OUTCOME_ERROR | Represents an error encountered by a failsafe routine during an atomic operation. If the careful option is set to FALSE (default), then the API function will continue to other atomic operations which may also result in other error_info objects of severity SPA_OUTCOME_ERROR. Note that this severity cannot occur when failsafe behavior is turned off (by setting the careful option to TRUE), since such errors have severity SPA_OUTCOME_FATAL in that case. |
SPA_OUTCOME_PROBLEM | Represents a problem encountered during an operation. This category of errors are less severe compared to SPA_OUTCOME_FATAL and SPA_OUTCOME_ERROR. |
SPA_OUTCOME_INSANITY | Represents an insanity in the model. |
include <err_info_base.hxx>
| outcome api_checking | ( | logical | on_off | ) |
Sets the pointer argument checking for an API call to on or off.
Role: With argument checking on, pointer arguments to an API are tested to determine whether they are NULL. If they are NULL, a message is printed and the API returns an outcome with a nonzero error code.
Checks are also made on certain distances and angles supplied to APIs. Some APIs make more extensive checks internally, but the effect is the same. When there is an on error a message prints and the API returns an outcome with a nonzero error code.
Effect: System routine
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| on_off | TRUE for on. |
include <kernapi.hxx>
| error_list_info* append_error_list_info | ( | error_list_info * | list1, | |
| error_list_info * | list2 | |||
| ) |
Concatenates two lists.
Role: This function appends the second list to the end of the first list and returns a pointer to the head of the combined list. In general, this function will traverse to the end of the first list; therefore, if used repetitively, the first list should be reasonably short.
| list1 | first list pointer. | |
| list2 | second list pointer. |
include <err_list.hxx>
| void check_outcome | ( | const outcome & | result | ) |
Check an outcome from an API and signal an exception if it is not OK.
Role: Checks the outcome and calls sys_error if it is not OK. This routine should be called after all routines that return an outcome and after each API_END. If the outcome is not checked, exception conditions will not propagate up the stack and get reported to the user.
Effect: System routine
| result | the outcome to check |
include <ckoutcom.hxx>
| void err_mess_type_filtered_list | ( | const error_info_list & | raw_eil, | |
| err_mess_type | err_num, | |||
| error_info_list & | filtered_eil | |||
| ) |
This function will add to filtered_eil only those error_info objects from the given raw_eil that are of the given type.
| raw_eil | input error_info_list. | |
| err_num | the desired err_mess_type. The error_info objects of this type will be put into filtered_eil. | |
| filtered_eil | error_info_list to which the function will add error_info objects from the incoming error_info_list that are of the given err_mess_type. |
include <err_info_list.hxx>
| void err_mess_type_filtered_list | ( | const error_info_base_list & | raw_eil, | |
| err_mess_type | err_num, | |||
| error_info_base_list & | filtered_eil | |||
| ) |
This function will add to filtered_eil only those error_info_base objects from the given raw_eil that are of the given type.
| raw_eil | input error_info_base_list | |
| err_num | the desired err_mess_type. The error_info_base objects of this type will be put into filtered_eil. | |
| filtered_eil | error_info_base_list to which the function will add error_info_base objects from the incoming error_info_base_list that are of the given err_mess_type. |
include <err_info_base_list.hxx>
| void error_begin | ( | ) |
Establishes ACIS signal handling.
Role: Each call to error_begin must be offset by a corresponding call to error_end. Calls to these two routines may be nested. The outermost call to error_begin establishes signal handlers, resets the warning count, and resets the error hardness level. Each call to error_begin increments the error level.
include <errorbase.hxx>
| void error_end | ( | ) |
Resets signal handling.
Role: Each call to error_end decrements the error level. When the error level reaches zero, error_end resets the signal handlers to those that were in effect when the corresponding call to error_begin was made. If a user interrupt was seen, the application's interrupt signal handler is called.
include <errorbase.hxx>
| void error_harden | ( | ) |
Inhibits processing of user interrupts.
Role: Each call to error_harden increments the error hardness level. User interrupts are temporarily ignored while the error hardness level is greater than zero. All other signals and errors are processed normally.
include <errorbase.hxx>
| void error_soften | ( | ) |
Enables processing of user interrupts.
Role: Each call to error_soften decrements the error hardness level. When the error hardness level reaches zero, any user interrupt that was ignored is processed.
include <errorbase.hxx>
| char const* find_err_ident | ( | err_mess_type | err_num | ) |
Returns the identifier string for an error number.
Role: Returns "UNKNOWN" if the error number is invalid.
| err_num | error number. |
include <errorbase.hxx>
| char const* find_err_mess | ( | err_mess_type | err_num | ) |
Gets the message string for an error number.
Role: Returns "unknown error" if the error number is invalid.
Effect: Read-only
| err_num | error number. |
include <errorbase.hxx>
| char const* find_err_module | ( | err_mess_type | err_num | ) |
Translates the error number to a string containing the name of the module associated with the given error number.
| err_num | error number. |
include <errorbase.hxx>
| error_list_info* find_error_list_info | ( | error_list_info * | list, | |
| int | typeno | |||
| ) |
Searches the given error_list_info list for the first entry of the given type (or NULL if none).
| list | given list pointer. | |
| typeno | type specifier. |
include <err_list.hxx>
| int get_error_info_entity_id_count | ( | const error_info_base * | eib | ) |
Gets the count of entity IDs, dead or alive, that are referred to by the given error_info object.
This is a helper function to determine whether an error_info object that is returned by an outcome object has any entity information.
If this function returns a positive value, then the user may check if the error_info object is of class error_info and downcast the pointer to the error_info object to class error_info_base in order to get the entity information. This function helps avoid the downcasting operation because it tells the user beforehand whether or not the error_info object refers to any entities, dead or alive.
| eib | pointer to an error_info_base object |
include <err_info.hxx>
| int get_warnings | ( | err_mess_type *& | warning_list | ) |
Obtains the warnings list.
| warning_list | Returned list of warnings. |
include <errorbase.hxx>
| void init_warnings | ( | ) |
Resets the number of warnings to 0.
Role: This is done automatically by error_begin(), but may be useful in special circumstances.
include <errorbase.hxx>
| void print_warnerr_mess | ( | char const * | msg, | |
| err_mess_type | err_num, | |||
| FILE * | fptr | |||
| ) |
Prints the message associated with the current error number in a simple format for debugging purposes.
| msg | string that will prefix the message. | |
| err_num | error number. | |
| fptr | file handle where the message will be printed. |
include <errorbase.hxx>
| void set_default_exception_control | ( | logical | set_default = TRUE |
) |
Enables or disables exceptions when floating point errors occur.
Role: Floating point errors, such as division by zero, can effect the integrity of a model. ACIS therfore utilizes hardware capabilities to identify and handle floating point errors accordingly. This is a state flag which remains in affect util the next call of this function.
| set_default | logical enabled, TRUE is the default. |
include <errorbase.hxx>
| const char* set_message | ( | err_mess_type | err_num, | |
| const char * | err_mess | |||
| ) |
Replace an error message with a custom message in the message_module system.
Role: An application may want to replace the error messages associated with error numbers in the ACIS message_module system with custom or translated message. This can be accomplished by calling the set_message function. This function accepts an error number and a reference to a new message to associate with the number. The function also returns the pointer to the original string so that one can reset the message if desired. The message_module system is not responsible for any memory allocations associated with the installed messages and care should be taken to assure that the lifetime of the installed messages is either longer than that of the message_module system or that they are un-installed at some point. Restoring the original string or installing a NULL string will avoid potential problems during termination.
| err_num | The error number. | |
| err_mess | The new error message |
include <errmsg.hxx>
| void sys_error | ( | err_mess_type | mess_num, | |
| error_info_base * | e_info | |||
| ) |
Signals ACIS errors and interrupts.
Role: Calling sys_error will invoke a C++ exception to be thrown. Hence, control is transferred to the responsible catch block. This can be your own catch block, an ACIS EXCEPTION_CATCH, or an API_END (which contains an EXCEPTION_CATCH).
Note: Since this causes an exception, if no catching mechanism is provided, the application will abort.
This version of sys_error has a error_info_base parameter. This allows the caller to specify additional information about the error.
| mess_num | error message number. | |
| e_info | extra information. |
include <errorbase.hxx>
| void sys_error | ( | err_mess_type | mess_num | ) |
Signals ACIS errors and interrupts.
Role: Calling sys_error will invoke a C++ exception to be thrown. Hence, control is transferred to the responsible catch block. This can be your own catch block, an ACIS EXCEPTION_CATCH, or an API_END (which contains an EXCEPTION_CATCH).
Note: Since this causes an exception, if no catching mechanism is provided, the application will abort.
| mess_num | error message number. |
include <errorbase.hxx>
| void sys_warning | ( | err_mess_type | mess_num | ) |
Signals an ACIS warning.
Role: Reports unexpected, nonfatal events that occurred during the course of the execution. It saves the error code given as input in an err_mess_type global array. Like sys_error, this routine checks for the crash option. If the option is on, it prints the message associated with the current error code. Otherwise, the application must process this warning.
| mess_num | error message number. |
include <errorbase.hxx>