void Variable::verifyValid(Value const &v) const { if(!isValid(v)) { /// @throw InvalidError Value @a v is not allowed by the variable. throw InvalidError("Variable::verifyValid", "Value type is not allowed by the variable '" + d->name + "'"); } }
void Error::translate(RemoteDB::Error e) { switch(e.code()) { //case SUCCESS : return "NoError"; case NOIMPL : throw NotImplementedError(e); case INVALID : throw InvalidError(e); case LOGIC : throw LogicError(e); case TIMEOUT : throw TimeoutError(e); case INTERNAL: throw InternalError(e); case NETWORK : throw NetworkError(e); case EMISC : throw MiscError(e); default : throw Error(e); } }