Altered status to reflect this is still open to debate. ** Changed in: nrtb Status: New => Opinion
** Changed in: nrtb Status: Opinion => Incomplete ** Changed in: nrtb Status: Incomplete => Opinion ** Changed in: nrtb Status: Opinion => Incomplete -- You received this bug notification because you are a member of NRTB Core, which is subscribed to New Real Time Battle. https://bugs.launchpad.net/bugs/722705 Title: Several dbAccess:: methods improperly return a error flag Status in The New Real Time Battle Project: Incomplete Bug description: Method int dbAccess::runSql (string scrpt) returns an int indicating success or failure and carrying no other significance. Best practices indicate that the method should succeed cleanly or throw an exception, therefore the return of a status flag is redundant; a failure would never return the error code in any case. Given the above, the method should be altered to not return any type of status code and to throw an exception (may I suggest dbAccess::runSql_failure as a name) should the query fail. A nice enhancement would be to store the error code and text in the exception so the actual event and problem can be resolved by the caller if needed. One other question while we are here, was the mis-spelling of "script" in the argument list intentional? _______________________________________________ Mailing list: https://launchpad.net/~nrtb-core Post to : nrtb-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~nrtb-core More help : https://help.launchpad.net/ListHelp