Skip to content

Remove Exceptions #18

@mtangoo

Description

@mtangoo

In wxWidgets coding guidelines exceptions are discouraged. This ticket aim at removing all exceptions in the library.

The idea I have is to have a class similar to QT SQLError. For function that can return bool (like Commit) will do so and for the rest, checking the error it will be something like

wxDatabase *pDatabase =  new wxMysqlDatabase(strServer, strDatabase, strUser, strPassword);
wxSQLError *error = pDatabase->GetLastError();
if(error->GetCode() == 0)
{
    //success
}
else
{
    //unsuccesful
    error->GetText();
    error->GetCode();
}

What do you think @patlkli @manyleaves and whoever reads this ;) ?

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions