Commit 4ca1b685 authored by Amol Bhave's avatar Amol Bhave Committed by Facebook Github Bot

Fix error messages in folly/dynamic

Summary:
Some of the error messages had the incorrect expected types.
Fix those occurences

Reviewed By: shixiao

Differential Revision: D10003775

fbshipit-source-id: ba8e3b7d14ee2c5442dfd24b9fbf7775d601f6f0
parent 2139ed4c
......@@ -190,7 +190,7 @@ dynamic const& dynamic::atImpl(dynamic const& idx) const& {
dynamic const& dynamic::at(StringPiece idx) const& {
auto* pobject = get_nothrow<ObjectImpl>();
if (!pobject) {
throw_exception<TypeError>("object/array", type());
throw_exception<TypeError>("object", type());
}
auto it = pobject->find(idx);
if (it == pobject->end()) {
......@@ -270,7 +270,7 @@ std::size_t dynamic::size() const {
if (auto* str = get_nothrow<std::string>()) {
return str->size();
}
throw_exception<TypeError>("array/object", type());
throw_exception<TypeError>("array/object/string", type());
}
dynamic::iterator dynamic::erase(const_iterator first, const_iterator last) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment