Changes between Initial Version and Version 1 of MapGuideRfc79


Ignore:
Timestamp:
07/16/09 19:47:57 (15 years ago)
Author:
Aleck
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc79

    v1 v1  
     1This page describes the format to be used when developing [wiki:MapGuideRfcs RFCs] for proposal to the mapguide-internals mail list and subsequent presentation to the !MapGuide PSC. New RFCs should be created following the instructions at the top of the [wiki:MapGuideRfcs RFCs] page.
     2
     3The  original version of this document was based on the RFCs from http://mapserver.gis.umn.edu/development/rfc.
     4
     5RFC Template Version:  1.0
     6Last Modified:  04:50, 3 November 2006 (CET)  (Jason Birch)
     7
     8----
     9= !MapGuide RFC # - Title Goes Here =
     10
     11This page contains an change request (RFC) for the !MapGuide Open Source project.
     12More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page.
     13
     14
     15== Status ==
     16
     17||RFC Template Version||(1.0)||
     18||Submission Date||July 17th, 2009||
     19||Last Modified||Aleck Sun [[Timestamp]]||
     20||Author||Aleck Sun||
     21||RFC Status||draft||
     22||Implementation Status||pending||
     23||Proposed Milestone||2.2||
     24||Assigned PSC guide(s)||Tom Fukushima||
     25||'''Voting History'''||(vote date)||
     26||+1||||
     27||+0||||
     28||-0||||
     29||-1||||
     30||no vote|| ||
     31
     32== Overview ==
     33
     34This proposal is to provide more specific exceptions and more information for the underlying FDO errors by exposing native error code of FDO provider.
     35
     36== Motivation ==
     37
     38As per FDO RFC37 FdoException is going to provide a GetNativeErrorCode method, MgFdoException should also provide such a method, so that users can get the native error code of FDO exception directly, and then do some specific process regarding the native error code .
     39Also, in GIS Platform API, the MgApplicationException does not have enough subclasses to indicate the actual error. Hence more specific exception classes will be added into GIS Platform.
     40
     41
     42== Proposed Solution ==
     43
     44The following methods will be added to class MgFdoException to return native error code. Code that creates an MgFdoException should be updated to assign it a native error code it possible
     45
     46{{{
     47class MG_PLATFORMBASE_API MgFdoException : public MgThirdPartyException
     48{
     49    DECLARE_CLASSNAME(MgFdoException)
     50PUBLISHED_API:
     51    ////////////////////////////////////////////////////////////////////
     52    /// \brief
     53    /// Retrieve the native error code of the underlying FDO exception.
     54    ///
     55    /// \return
     56    /// native error code of an fdo exception
     57    ///
     58    INT64 GetNativeErrorCode();
     59
     60EXTERNAL_API:
     61////////////////////////////////////////////////////////////////////
     62    /// \brief
     63    /// Construct a MgFdoException object.
     64    ///
     65    /// \param methodName
     66    /// Name of the method where the exception occurred.
     67    /// \param lineNumber
     68    /// Line number where the exception occurred.
     69    /// \param fileName
     70    /// File name where the exception occurred.
     71    /// \param whatArguments
     72    /// Collection of arguments used to format the message that describes what the exception is.
     73    /// \param whyMessageId
     74    /// ID of the message that describes why the exception occurs.
     75    /// \param whyArguments
     76    /// Collection of arguments used to format the message that describes why the exception occurs.
     77    ///
     78    MgFdoException(CREFSTRING methodName, INT32 lineNumber,
     79        CREFSTRING fileName, MgStringCollection* whatArguments,
     80        CREFSTRING whyMessageId, MgStringCollection* whyArguments,
     81        INT64 nativeErrorCode) throw();
     82};
     83}}}
     84 
     85
     86The following exception classes will be added into GIS Platform 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 MgException.
     87The description of new exception classes above are as follows.
     88
     89
     90
     91The description of new exception classes above are as follows.
     92MgNotConnectedException: Thrown when executing an operation that require feature source connection is connected.
     93MgWrongConnectionParamValueException: Thrown when connecting datastore with invalid connection parameters.
     94MgInsufficentPrivilegesException: Thrown when connecting a FDO data source without sufficient privileges.
     95MgInvalidSQLStatementException: Thrown when executing an invalid SQL statement.
     96MgOutOfRangePropertyValueException: Thrown when setting the property value to one which violates constraint FdoPropertyValueConstraintRange.
     97MgNotUniquePropertyValueException: Thrown when setting the property value to one which isn’t unique.
     98MgNotInListPropertyValueException: Thrown when setting the property value to one which violates constraint FdoPropertyValueConstraintList.
     99MgSchemaDoesNotExistException: Thrown when the specified schema doesn’t exist.
     100MgSchemaAlreadyExistsException: Thrown when creating a schema that already exists.
     101MgClassDoesNotExistException: Thrown when the specified class doesn’t exist.
     102MgClassAlreadyExistsException: Thrown when creating a class that already exists.
     103MgPropertyDoesNotExistException: Thrown when the specified class doesn’t exist.
     104MgPropertyAlreadyExistsException: Thrown when creating a class that already exists.
     105
     106
     107== Implications ==
     108
     109The server should be updated to throw the newly added detailed exceptions if possible.
     110
     111== Test Plan ==
     112
     113Run the existing unit tests.
     114
     115== Funding/Resources ==
     116
     117Autodesk to provide resources / funding