::errno and ned14's system_code go brrrrrrr
::errno and ned14's system_code go brrrrrrr
I've always found C++'s "trend" of handling normal or non-exceptional system errors with exceptions lackluster (and I'm being charitable). Overall trimming things down to (basically) passing around a couple integers and telling the user to check their manual is much better, much less error prone, and much more efficient and deterministic.
QSqlError
in my functions and point the user toQSqlError
documentation in QtF1
at any time in Qt Creator to get the help pagebool
return value (I am sitting 10m away in the same room as the client. Senior management is in another state)F1
on their computer and show the userbool QSqlError::isValid()
bool
result.isValid()
in anif
statement.bool
deleteDocument
function is deleting the document but returning false.Yes, they called
deleteDocument
on the same ID twice.BTW, I did create a manual with usage examples.
A few months later, a senior engineer on the client side checks their code and tells me to
throw
exceptions for everything, because half of the time, the user-devs are not checking theQSqlError
return values.From what I remember, that gives a warning an not an error.
The clients' code already has >400 errors on every build. They won't care
Yeah,
[[nodiscard]]
throws a warning (that's half the point of attributes, anyway).