Commit f6216567 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

sqlite: errors: Add an isInnocuous helper

parent a6f7f300
......@@ -26,6 +26,8 @@
#include <exception>
#include <stdexcept>
#include <sqlite3.h>
namespace medialibrary
{
......@@ -92,6 +94,18 @@ public:
}
};
static inline bool isInnocuous( const GenericExecution& ex )
{
switch ( ex.code() )
{
case SQLITE_IOERR:
case SQLITE_NOMEM:
return true;
}
return false;
}
} // namespace errors
} // namespace sqlite
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment