Beispiel #1
0
 bool ReapError(error::ErrorStack& errs)
 {
     if (the_error.empty())
         return false;
     errs.push(the_error.release());
     return true;
 }
Beispiel #2
0
    void set_missing_required(const char* name)
    {
        if (the_error.empty() || the_error->type() != error::MISSING_REQUIRED)
            the_error.reset(new error::RequiredFieldMissingError());

        std::vector<std::string>& missing =
            static_cast<error::RequiredFieldMissingError*>(the_error.get())->missing_members();

        missing.push_back(name);
    }
Beispiel #3
0
    bool EndObject(SizeType length)
    {
        --depth;
        if (depth > 0) {

            switch (state) {

            case 0:
    return checked_event_forwarding(handler_0.EndObject(length));

            default:
                break;
            }
        } else {
            if (!has_SpaceID) set_missing_required("SpaceID");
        }
        return the_error.empty();
    }
Beispiel #4
0
 bool HasError() const
 {
     return !the_error.empty();
 }