mirror of https://gitee.com/bigwinds/arangodb
fixed [] attribute access
This commit is contained in:
parent
162681ada4
commit
7feea4c640
|
@ -189,12 +189,11 @@ namespace triagens {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ExecutionBlock* operator[] (size_t pos) {
|
||||
if (pos > _dependencies.size()) {
|
||||
if (pos >= _dependencies.size()) {
|
||||
return nullptr;
|
||||
}
|
||||
else {
|
||||
return _dependencies.at(pos);
|
||||
}
|
||||
|
||||
return _dependencies.at(pos);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -172,12 +172,11 @@ namespace triagens {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ExecutionNode* operator[] (size_t pos) const {
|
||||
if (pos > _dependencies.size()) {
|
||||
if (pos >= _dependencies.size()) {
|
||||
return nullptr;
|
||||
}
|
||||
else {
|
||||
return _dependencies.at(pos);
|
||||
}
|
||||
|
||||
return _dependencies.at(pos);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -238,9 +238,15 @@ QueryResult Query::execute () {
|
|||
catch (triagens::arango::Exception const& ex) {
|
||||
return QueryResult(ex.code(), ex.message());
|
||||
}
|
||||
catch (...) {
|
||||
catch (std::bad_alloc const& ex) {
|
||||
return QueryResult(TRI_ERROR_OUT_OF_MEMORY, TRI_errno_string(TRI_ERROR_OUT_OF_MEMORY));
|
||||
}
|
||||
catch (std::exception const& ex) {
|
||||
return QueryResult(TRI_ERROR_INTERNAL, ex.what());
|
||||
}
|
||||
catch (...) {
|
||||
return QueryResult(TRI_ERROR_INTERNAL, TRI_errno_string(TRI_ERROR_INTERNAL));
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue