fixed error handling
Merge branch 'pregel' of https://github.com/triAGENS/ArangoDB into pregel