Include the reason for failure when validating
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/e114191e Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/e114191e Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/e114191e Branch: refs/heads/HACK-benchmark-COUCHDB-3191-improve-couch-lru-performance Commit: e114191e43a79378001dbafc96d0d6226e433795 Parents: 0aa8c06 Author: Paul J. Davis <paul.joseph.da...@gmail.com> Authored: Mon Oct 17 14:09:12 2016 -0500 Committer: Paul J. Davis <paul.joseph.da...@gmail.com> Committed: Mon Oct 17 14:09:12 2016 -0500 ---------------------------------------------------------------------- src/couch_lru.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/e114191e/src/couch_lru.erl ---------------------------------------------------------------------- diff --git a/src/couch_lru.erl b/src/couch_lru.erl index 7b66840..a321a80 100644 --- a/src/couch_lru.erl +++ b/src/couch_lru.erl @@ -153,8 +153,9 @@ validate(Lru) -> validate(Lru, H) end, true - catch _:_ -> - false + catch Type:Reason -> + Stack = erlang:get_stacktrace(), + {false, {Type, Reason, Stack}} end.