diff options
author | Scott Hernandez <scotthernandez@gmail.com> | 2013-07-27 09:13:10 -0400 |
---|---|---|
committer | Scott Hernandez <scotthernandez@gmail.com> | 2013-07-30 17:35:13 -0400 |
commit | 3015fc5f5ecd588c0e7873cf07f2b8818c191165 (patch) | |
tree | 226caf1f3ae07cfa8a87828656a18131a5fc44d3 /src/mongo/db/ops/path_support.cpp | |
parent | 60f9f92f966d7bfabe722d96bc6e196292a4d051 (diff) | |
download | mongo-3015fc5f5ecd588c0e7873cf07f2b8818c191165.tar.gz |
SERVER-7176: return better error message from pathsupport::findLongestPrefix
Diffstat (limited to 'src/mongo/db/ops/path_support.cpp')
-rw-r--r-- | src/mongo/db/ops/path_support.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/ops/path_support.cpp b/src/mongo/db/ops/path_support.cpp index b4d5b6b6ccf..1b7bf11aafa 100644 --- a/src/mongo/db/ops/path_support.cpp +++ b/src/mongo/db/ops/path_support.cpp @@ -130,7 +130,10 @@ namespace pathsupport { *idxFound = i - 1; *elemFound = prev; return Status(ErrorCodes::PathNotViable, - "cannot use the part to traverse the document"); + mongoutils::str::stream() << "cannot use the part (" << + prefix.getPart(i-1) << " of " << prefix.dottedField() << + ") to traverse the element ({" << + curr.toString() << "})"); } else if (curr.ok()) { *idxFound = i - 1; |