1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-24 02:21:01 +03:00

Merge pull request #1221 from rivertam/better-error-305

Better error 305
This commit is contained in:
Niels Lohmann
2018-09-18 12:49:07 +02:00
committed by GitHub
4 changed files with 51 additions and 51 deletions

View File

@ -3097,7 +3097,7 @@ class basic_json
return m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name())));
JSON_THROW(type_error::create(305, "cannot use operator[] with a numeric argument with " + std::string(type_name())));
}
/*!
@ -3127,7 +3127,7 @@ class basic_json
return m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name())));
JSON_THROW(type_error::create(305, "cannot use operator[] with a numeric argument with " + std::string(type_name())));
}
/*!
@ -3173,7 +3173,7 @@ class basic_json
return m_value.object->operator[](key);
}
JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name())));
JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name())));
}
/*!
@ -3215,7 +3215,7 @@ class basic_json
return m_value.object->find(key)->second;
}
JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name())));
JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name())));
}
/*!
@ -3262,7 +3262,7 @@ class basic_json
return m_value.object->operator[](key);
}
JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name())));
JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name())));
}
/*!
@ -3305,7 +3305,7 @@ class basic_json
return m_value.object->find(key)->second;
}
JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name())));
JSON_THROW(type_error::create(305, "cannot use operator[] with a string argument with " + std::string(type_name())));
}
/*!