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 ;) ?
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
What do you think @patlkli @manyleaves and whoever reads this ;) ?