Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

Exceptions

Nicuvëo edited this page Mar 29, 2014 · 1 revision

All error handling in SAW is based on exceptions. All exceptions that might be thrown from SAW inherit from both a common saw::Exception and a corresponding standard C++ exception.

--

Exceptions

Name Underlying type
saw::BadAlloc std::runtime_error
saw::LogicError std::logic_error
saw::OutOfRange std::out_of_range
saw::RuntimeError std::runtime_error
saw::InternalError std::logic_error

--

sqlite3 error codes

Error code Thrown exception
SQLITE_NOMEM BadAlloc
SQLITE_RANGE OutOfRange
SQLITE_INTERNAL LogicError
SQLITE_ABORT LogicError
SQLITE_READONLY LogicError
SQLITE_NOTFOUND LogicError
SQLITE_CONSTRAINT LogicError
SQLITE_MISMATCH LogicError
SQLITE_MISUSE LogicError
SQLITE_NOLFS LogicError
SQLITE_FORMAT LogicError
SQLITE_ERROR RuntimeError
SQLITE_PERM RuntimeError
SQLITE_BUSY RuntimeError
SQLITE_LOCKED RuntimeError
SQLITE_INTERRUPT RuntimeError
SQLITE_IOERR RuntimeError
SQLITE_CORRUPT RuntimeError
SQLITE_FULL RuntimeError
SQLITE_CANTOPEN RuntimeError
SQLITE_PROTOCOL RuntimeError
SQLITE_EMPTY RuntimeError
SQLITE_SCHEMA RuntimeError
SQLITE_TOOBIG RuntimeError
SQLITE_AUTH RuntimeError
SQLITE_NOTADB RuntimeError
any other error RuntimeError

Clone this wiki locally