1
0
Fork 0

added better error reporting

This commit is contained in:
Frank Celler 2014-02-22 13:00:26 +01:00
parent a2fb92948e
commit 9680f48c5b
1 changed files with 2 additions and 2 deletions

View File

@ -237,8 +237,8 @@ function byExample (data) {
if (typeof example !== "object" || Array.isArray(example)) {
// invalid datatype for example
var err1 = new ArangoError();
err1.errorNum = internal.errors.ERROR_ARANGO_DOCUMENT_TYPE_INVALID;
err1.errorMessage = "invalid document type";
err1.errorNum = internal.errors.ERROR_ARANGO_DOCUMENT_TYPE_INVALID.code;
err1.errorMessage = "invalid document type '" + (typeof example) + "'";
throw err1;
}