Better error handling on closed tables and geodatabases for C FileGeodatabase API

Idea created by p_d_austin on Jun 30, 2015
    • p_d_austin

    Would it be possible to extend the API to add an isClosed method to the Geodatabase and Table classes? Also isWriteLocked and isLoadOnlyMode on Table would be useful.


    At the moment applications have to implement some other kind of reference counting to make sure they don't access closed geodatabases or tables or track if a table is locked or in load only mode.


    Trying to access closed geodatabase or tables causes a core dump rather than throwing some kind of exception or error code. This makes developing applications tricky as apps just crash rather than getting a nice 'This object is closed' type message.

    Also update all the internal code so that if a Table, Geodatabase or any closeable resource has been closed that code within those classes does not try to reference a null pointer to avoid core dumps. An exception could be thrown instead.