Add some error messages for some DCHECKs.

Reviewed By: simpkins

Differential Revision: D4219453

fbshipit-source-id: 391dd5ec57e01b2f09154eb991eb3e8e2e969f62
This commit is contained in:
Michael Bolin 2016-11-26 12:00:19 -08:00 committed by Facebook Github Bot
parent 9156794f06
commit 98c56736cd

View File

@ -98,11 +98,13 @@ std::unique_ptr<HgStatus> Dirstate::getStatus() const {
// Get the directory as a TreeInode.
auto dirInode = mountPoint_->getDirInodeForPath(directory);
auto treeInode = std::dynamic_pointer_cast<TreeInode>(dirInode);
DCHECK_NOTNULL(treeInode.get());
DCHECK(treeInode.get() != nullptr) << "Failed to get a TreeInode for "
<< directory;
// Get the directory as a Tree.
auto tree = getTreeForDirectory(directory, rootTree.get(), objectStore_);
DCHECK_NOTNULL(tree.get());
DCHECK(tree.get() != nullptr) << "Failed to getTreeForDirectory() for "
<< directory;
DirectoryDelta delta;
computeDelta(rootTree.get(), *treeInode, delta);