48 | | The following methods will be added to class FdoException to return native error code. Providers will be updated to assign native error code when a FDO exception is created. If there is no native error code assigned, the default value is 0. |
| 49 | The following methods will be added to class FdoException to return native error code. Providers will be updated to assign native error code when a FDO exception is created. If there is no native error code assigned, the default value is 0. |
| 50 | |
| 51 | {{{ |
| 52 | class FdoException : public FdoIDisposable |
| 53 | { |
| 54 | public: |
| 55 | /// \brief |
| 56 | /// Returns an instance of a FdoException using the specified arguments. |
| 57 | /// |
| 58 | /// \param message |
| 59 | /// Input the error message |
| 60 | /// \param nativeErrorCode |
| 61 | /// Input the native error code, which is returned by FDO data source. |
| 62 | /// |
| 63 | /// \return |
| 64 | /// Returns the FdoException object |
| 65 | /// |
| 66 | FDO_API_COMMON static FdoException* Create(FdoString* message, FdoInt64 nativeErrorCode); |
| 67 | |
| 68 | /// \brief |
| 69 | /// Returns an instance of a FdoException using the specified arguments. |
| 70 | /// |
| 71 | /// \param message |
| 72 | /// Input the error message |
| 73 | /// \param cause |
| 74 | /// Input the cause of the error. |
| 75 | /// \param nativeErrorCode |
| 76 | /// Input the native error code, which is returned by FDO data source. |
| 77 | /// |
| 78 | /// \return |
| 79 | /// Returns the FdoException object |
| 80 | /// |
| 81 | FDO_API_COMMON static FdoException* Create(FdoString* message, FdoException* cause, FdoInt64 nativeErrorCode); |
| 82 | |
| 83 | /// \brief |
| 84 | /// Gets the native error code returned from FDO data source |
| 85 | /// |
| 86 | /// \return |
| 87 | /// Returns the native error code |
| 88 | /// |
| 89 | FDO_API_COMMON virtual FdoInt64 GetNativeErrorCode(); |
| 90 | } |
| 91 | }}} |
| 92 | |
| 93 | The following exception classes will be added to FDO API. In the following class diagram, ones with white color are the existing classes and ones with light green color are the new ones. There are no any new methods added to those new exception classes. All of methods are inherited from FdoIException. |
| 94 | |
| 95 | The description of new exception classes above are as follows. |
| 96 | |
| 97 | - FdoNotConnectedException: The FdoNotConnectedException class is the exception type thrown from classes in the Data package. This exception is thrown whenever executing an operation which requires FDO connection is connected, but FDO connection isn’t connected. |
| 98 | - FdoWrongConnectionParamValueException: The FdoWrongConnectionParamValueException class is the exception type thrown from classes in the Connections package. This exception is thrown whenever connecting datastore with invalid connection parameters. The message should always mention which parameters were invalid. |
| 99 | - FdoInsufficentPrivilegesException: The FdoInsufficentPrivliegesException class is the exception type thrown from classes in the Connections package. This exception is thrown whenever connecting a FDO data source without sufficient privileges. |
| 100 | - FdoSQLCommandException: The FdoSQLCommandException class is the exception type thrown from class FdoISQLCommand. |
| 101 | - FdoInvalidSQLStatementException: The FdoInvalidSQLStatementException class is the exception type thrown from class FdoISQLCommand. This exception is thrown whenever executing an invalid SQL statement. |
| 102 | - FdoConstraintException: The FdoConstraintException class is the exception type thrown from classes editing property values of datastore. |
| 103 | - FdoNullPropertyValueException: The FdoNullPropertyValueException class is the exception type thrown from classes editing property values of datastore. This exception is thrown whenever setting a non-nullable property value to null. |
| 104 | - FdoOutOfRangePropertyValueException: The FdoOutOfRangePropertyValueException class is the exception type thrown from classes editing property values of datastore. This exception is thrown whenever setting the property value to one which violates constraint FdoPropertyValueConstraintRange. |
| 105 | - FdoNotUniquePropertyValueException: The FdoNotUniquePropertyValueException class is the exception type thrown from classes editing property values of datastore. This exception is thrown whenever setting the property value to one which isn’t unique. |
| 106 | - FdoNotInListPropertyValueException: The FdoNotInListPropertyValueException class is the exception type thrown from classes editing property values of datastore. This exception is thrown whenever setting the property value to one which violates constraint FdoPropertyValueConstraintList. |
| 107 | - FdoSchemaDoesNotExistException: The FdoSchemaDoesNotExistException class is the exception type thrown from classes in the Data and Schema packages. This exception is thrown whenever the specified schema doesn’t exist. |
| 108 | - FdoSchemaAlreadyExistsException: The FdoSchemaDoesNotExistException class is the exception type thrown from classes FdoIApplySchema. This exception is thrown whenever creating a schema which already exists. |
| 109 | - FdoClassDoesNotExistException: The FdoClassDoesNotExistException class is the exception type thrown from classes in the Data and Schema packages. This exception is thrown whenever the specified class doesn’t exist. |
| 110 | - FdoClassAlreadyExistsException: The FdoClassAlreadyExistsException class is the exception type thrown from classes FdoIApplySchema. This exception is thrown whenever creating a class which already exists. |
| 111 | - FdoPropertyDoesNotExistException: The FdoClassDoesNotExistException class is the exception type thrown from classes in the Data and Schema packages. This exception is thrown whenever the specified class doesn’t exist. |
| 112 | - FdoPropertyAlreadyExistsException: The FdoClassAlreadyExistsException class is the exception type thrown from classes FdoIApplySchema. This exception is thrown whenever creating a class which already exists. |