• HOME
  • ABOUT
    AD&Co
    AD&Co Staff Vendor Partners News & Events Press Releases AD&Co in the News Contact Us
  • VECTORS™
    ANALYTICS
    Prepayment Credit Valuation RiskProfiler™ CreditProfile™
  • CONSULTING
  • PUBLICATIONS
    & RESEARCH
    The Pipeline The Pipeline Archives Quantitiative Perspectives Library Books & Papers Presentations
  • ONLINE TOOLS
    & REPORTS
    Model Demos Mortgage Analysis & Performance Reporting Market Valuation Reports Trend Reports CreditProfile™
  • VECTORS™
    SUPPORT
    Downloads FAQs Glossary Installation and Version Compatibility Model Description Model Validation Tuning Support User Manuals/Tutorials/Guides Release Notes Developer Support
  • My AD&Co
 
    Quick Links
  • API Integration Coding for Developers

API INTEGRATION CODING FOR DEVELOPERS

Error Event Class: adco_cError

Description

All errors thrown by the library are of this class. The implementation is "smart" to deal with a peculiarity of the C++ throw/catch mechanism. When an error of a derived class is thrown, but an object of the base class is caught, there is a potential loss of data. The thrown error is generally created on the process memory heap, the stack cut back to the catch statement state, and base class copy constructor is used to make a duplicate on the stack. When the catch block is exited, both the local copy and the original are destroyed. If the derived class contains useful data, this is not visible within the catch block.

To allow the library to store additional error info not described in the public base class structure, the base adco_cError class contains a private member mRealMe which is an adco_cError class pointer. Normal instances are constructed to point at themselves, but the constructor is protected, so only derived classes can be instanciated. For instances of the base class created via the copy constructor, mRealMe points to the original dervied error class instance. This allows the public methods to reach into the original error for additional info.

Methods

virtual const char* message() const;

Descriptive message describing the error.

virtual unsigned int msglen() const;

The length of the message text (not including the terminating null character).

virtual adco_cEnumElem severity() const;

All errors are classified from a global ErrorClass list. Thrown errors are always ADCO_E_ERROR.

virtual adco_cEnumElem msgelement() const;

The element of the global Error Message list used to generate the error.

 

 




65 Bleecker St., Fifth Floor New York NY 10012   tel 212.274.9075   fax 212.274.0545
© 2012 Andrew Davidson & Co., Inc.