EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OmmException.h
Go to the documentation of this file.
1 /*|-----------------------------------------------------------------------------
2  *| This source code is provided under the Apache 2.0 license --
3  *| and is provided AS IS with no warranty or guarantee of fit for purpose. --
4  *| See the project's LICENSE.md for details. --
5  *| Copyright (C) 2020 Refinitiv. All rights reserved. --
6  *|-----------------------------------------------------------------------------
7  */
8 
9 #ifndef __thomsonreuters_ema_access_OmmException_h
10 #define __thomsonreuters_ema_access_OmmException_h
11 
31 #define MAX_SIZE 2048
32 #define PADDING 256
33 #define MAX_SIZE_PLUS_PADDING MAX_SIZE + PADDING
34 
35 #include "Access/Include/Common.h"
36 
37 namespace thomsonreuters {
38 
39 namespace ema {
40 
41 namespace access {
42 
43 class EmaString;
44 
46 {
47 public :
48 
53  {
70  OmmJsonConverterExceptionEnum
71  };
72 
74 
75 
78  const EmaString& getExceptionTypeAsString() const;
79 
83  virtual ExceptionType getExceptionType() const = 0;
84 
88  virtual const EmaString& getText() const = 0;
89 
93  virtual const EmaString& toString() const = 0;
94 
99  operator const char*() const;
101 
102 protected :
103 
104  OmmException();
105  virtual ~OmmException();
106 
107  OmmException& statusText( const EmaString& statusText );
108  OmmException& statusText( const char* statusText );
109 
110  const EmaString& toStringInt() const;
111 
113  mutable char _errorText[MAX_SIZE];
114  mutable char _space[MAX_SIZE_PLUS_PADDING];
115 
116  OmmException( const OmmException& );
117  OmmException& operator=( const OmmException& );
118 };
119 
120 }
121 
122 }
123 
124 }
125 
126 #endif // __thomsonreuters_ema_access_OmmException_h
#define MAX_SIZE_PLUS_PADDING
Definition: OmmException.h:33
unsigned int UInt32
represents 32-bit unsigned integer
Definition: Common.h:56
EmaString class is a container of a null terminated Ascii character string.
Definition: EmaString.h:56
#define MAX_SIZE
Definition: OmmException.h:31
#define EMA_ACCESS_API
Definition: Common.h:95
Common.h file provides definitions of common variable types used in EMA.
OmmException is a parent class for all exception types thrown by EMA.
Definition: OmmException.h:45