Teamcenter C++ API Reference  2312
Classes | Namespaces | Functions
error_map.hxx File Reference
#include <base_utils/TcBaseTypes.hxx>
#include <error.h>
#include <base_utils/SharedPtr.hxx>
#include <base_utils/ErrorStoreBase.hxx>
#include <tc/tc_startup.h>
#include <fclasses/libfclasses_exports.h>
#include <fclasses/libfclasses_undef.h>

Go to the source code of this file.

Classes

class  Teamcenter::Error
 The most-recent error, and related information. If required, we may turn this into an iterable error list, starting with the most recent. More...
 
class  Teamcenter::ErrorMap
 An indexed map of errors. Filters out ITK_ok errors on addition. ErrorMap implements a set-based style of error reporting, very different from Teamcenter ITK-style error stacks. We expect clients to return ErrorMaps from set-based functions, and the class is optimized for this use case. Clietns will associate each Error with an array index identifier. The ErrorMap class conceptually stacks up Errors under these index identifiers, returning the most recent. Clients may need to re-map index identifiers as they pass ErrorMaps up the call chain. More...
 
class  Teamcenter::ExceptionPolicy
 Change from a bulk-reporting ErrorMap policy to an immediate-throw IFail exception policy. RAII class for temporary change and restore. More...
 
class  Teamcenter::IgnoreExceptionPolicy
 

Namespaces

namespace  Teamcenter
 A convenient C++ class to manage a list of tag_t. This convenient class is derived from TagList class which is only available for internal developers.
 
namespace  Teamcenter::Private
 

Functions

Error Teamcenter::Private::pushErrorStack (int ifail, const char *s1=0, const char *s2=0, const char *s3=0, const char *s4=0, const char *s5=0, const char *s6=0, const char *s7=0)
 Push ifail to error stach and create an Error object. Retain the error stack. ErrorMap exception policy. More...
 
Error Teamcenter::Private::readErrorStack (int ifail)
 Read error stack into an Error object. Retain the error stack. ErrorMap exception policy. More...
 
Error Teamcenter::Private::takeErrorStack (int ifail)
 Take ownership of error stack into an Error object. Clear the error stack ready for later use. ErrorMap exception policy. More...
 
Error Teamcenter::Private::takeErrorStack (IFail const &ifail)
 Take ownership of error stack into an Error object, and clear. Clear the error stack ready for later use. ErrorMap exception policy. More...
 
Error Teamcenter::Private::takeErrorStack (status_t const &status)
 Take ownership of error stack into an Error object, and clear. Clear the error stack ready for later use. ErrorMap exception policy. More...
 

Detailed Description

Set-based error reporting and enquiry. Set-based functions report errors in two different ways.

  1. Hard errors - throw an IFail object. Execution is passed rapidly back to an enclosing catch block. Any returned objects can, and should be, destroyed as usual. No other guarantee is made about program state. An error is hard if:
    • You could (in some valid implementation) find the same error on an empty-set input.
    • The error has nothing to do with the current set member (array index), or any closely related object.
    • It would be insane to continue execution.
  1. Soft errors - return an ErrorMap object. Processing of the current set member is aborted, and iteration over the next set member will begin. There must be no observable state change for the aborted set member. An error is soft if:
    • There are no side effects from the current iteration, or the side effects have been undone.
    • The error is associated with an individual set member (array index), or a closely related object.
    • It is sensible to continue execution.

Definition in file error_map.hxx.