Return an error from descriptor Parse that gives more information about what failed

This commit is contained in:
Andrew Chow
2019-08-02 18:04:02 -04:00
parent 7a960ba775
commit c325f619dd
7 changed files with 110 additions and 51 deletions

View File

@@ -79,7 +79,7 @@ struct Descriptor {
* If a parse error occurs, or the checksum is missing/invalid, or anything
* else is wrong, nullptr is returned.
*/
std::unique_ptr<Descriptor> Parse(const std::string& descriptor, FlatSigningProvider& out, bool require_checksum = false);
std::unique_ptr<Descriptor> Parse(const std::string& descriptor, FlatSigningProvider& out, std::string& error, bool require_checksum = false);
/** Get the checksum for a descriptor.
*