28#ifndef INCLUDED_BLPAPI_EXCEPTION
29#define INCLUDED_BLPAPI_EXCEPTION
103#ifndef INCLUDED_BLPAPI_DEFS
107#ifndef INCLUDED_BLPAPI_ERROR
137#ifndef INCLUDED_EXCEPTION
139#define INCLUDED_EXCEPTION
142#ifndef INCLUDED_STRING
144#define INCLUDED_STRING
166 const std::string d_description;
186 virtual const char *
what()
const throw();
360 static void throwException(
int errorCode);
386 : d_description(newDescription)
394 return d_description;
407 const std::string& newDescription)
417 const std::string& newDescription)
427 const std::string& newDescription)
437 const std::string& newDescription)
447 const std::string& newDescription)
457 const std::string& newDescription)
467 const std::string& newDescription)
477 const std::string& newDescription)
495inline void ExceptionUtil::throwException(
int errorCode)
499 description =
"Unknown";
503 throw DuplicateCorrelationIdException(description);
508 throw InvalidStateException(description);
510 throw InvalidArgumentException(description);
512 throw InvalidConversionException(description);
514 throw IndexOutOfRangeException(description);
516 throw FieldNotFoundException(description);
518 throw UnsupportedOperationException(description);
520 throw NotFoundException(description);
522 throw Exception(description);
529 throwException(errorCode);
Common definitions used by the library.
#define BLPAPI_EXPORT
Definition blpapi_defs.h:171
Provide a collection of errors that library can return.
BLPAPI_EXPORT const char * blpapi_getLastErrorDescription(int resultCode)
#define BLPAPI_RESULTCLASS(res)
Definition blpapi_error.h:54
#define BLPAPI_BOUNDSERROR_CLASS
Definition blpapi_error.h:61
#define BLPAPI_UNSUPPORTED_CLASS
Definition blpapi_error.h:64
#define BLPAPI_INVALIDARG_CLASS
Definition blpapi_error.h:58
#define BLPAPI_INVALIDSTATE_CLASS
Definition blpapi_error.h:57
#define BLPAPI_ERROR_DUPLICATE_CORRELATIONID
Definition blpapi_error.h:70
#define BLPAPI_CNVERROR_CLASS
Definition blpapi_error.h:60
#define BLPAPI_FLDNOTFOUND_CLASS
Definition blpapi_error.h:63
#define BLPAPI_NOTFOUND_CLASS
Definition blpapi_error.h:62
Definition blpapi_exception.h:205
DuplicateCorrelationIdException(const std::string &description)
Definition blpapi_exception.h:406
Definition blpapi_exception.h:357
static void throwOnError(int errorCode)
Definition blpapi_exception.h:526
Definition blpapi_exception.h:164
Exception(const std::string &description)
Definition blpapi_exception.h:385
virtual const char * what() const
Definition blpapi_exception.h:397
const std::string & description() const
Definition blpapi_exception.h:392
virtual ~Exception()
Definition blpapi_exception.h:390
Definition blpapi_exception.h:290
FieldNotFoundException(const std::string &description)
Definition blpapi_exception.h:456
Definition blpapi_exception.h:271
IndexOutOfRangeException(const std::string &description)
Definition blpapi_exception.h:446
Definition blpapi_exception.h:238
InvalidArgumentException(const std::string &description)
Definition blpapi_exception.h:426
Definition blpapi_exception.h:254
InvalidConversionException(const std::string &description)
Definition blpapi_exception.h:436
Definition blpapi_exception.h:222
InvalidStateException(const std::string &description)
Definition blpapi_exception.h:416
Definition blpapi_exception.h:340
NotFoundException(const std::string &description)
Definition blpapi_exception.h:486
Definition blpapi_exception.h:307
UnknownErrorException(const std::string &description)
Definition blpapi_exception.h:466
Definition blpapi_exception.h:323
UnsupportedOperationException(const std::string &description)
Definition blpapi_exception.h:476
BLPAPI_EXPORT int blpapi_getErrorInfo(blpapi_ErrorInfo_t *buffer, int errorCode)
char description[256]
Definition blpapi_exception.h:123
int exceptionClass
Definition blpapi_exception.h:122
Definition blpapi_abstractsession.h:195
Definition blpapi_exception.h:121