~m-a-uchida/maus/RKdEdxDevel

« back to all changes in this revision

Viewing changes to src/common_cpp/JsonCppProcessors/ObjectProcessor-inl.hh

  • Committer: Durga Rajaram
  • Date: 2014-01-14 07:07:02 UTC
  • mfrom: (659.1.80 relcand)
  • Revision ID: durga@fnal.gov-20140114070702-2l1fuj1w6rraw7xe
Tags: MAUS-v0.7.6
MAUS-v0.7.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
    const Json::Value& json_object) {
151
151
    if (json_object.type() != Json::objectValue) {
152
152
        std::string tp = JsonWrapper::ValueTypeToString(json_object.type());
153
 
        throw(Squeal(Squeal::recoverable,
 
153
        throw(Exception(Exception::recoverable,
154
154
                     "Attempt to pass a json "+tp+" type as an object",
155
155
                     "ObjectProcessor<ObjectType>::JsonToCpp"));
156
156
    }
163
163
                unknown += *it+" ";
164
164
            }
165
165
        }
166
 
        throw(Squeal(Squeal::recoverable,
 
166
        throw(Exception(Exception::recoverable,
167
167
                     "Failed to recognise all json properties "+unknown,
168
168
                     "ObjectProcessor<ObjectType>::JsonToCpp"));
169
169
    }
171
171
    for (my_iter it = _items.begin(); it != _items.end(); ++it) {
172
172
        try {
173
173
            it->second->SetCppChild(json_object, *cpp_object);
174
 
        } catch(Squeal squee) {
 
174
        } catch(Exception exc) {
175
175
            delete cpp_object;
176
 
            squee.SetMessage("In branch "+it->first+"\n"
177
 
                            +squee.GetMessage());
178
 
            throw squee;
 
176
            exc.SetMessage("In branch "+it->first+"\n"
 
177
                            +exc.GetMessage());
 
178
            throw exc;
179
179
        }
180
180
    }
181
181
    return cpp_object;
189
189
    for (my_iter it = _items.begin(); it != _items.end(); ++it) {
190
190
        try {
191
191
            it->second->SetJsonChild(cpp_object, *json_object);
192
 
        } catch(Squeal squee) {
 
192
        } catch(Exception exc) {
193
193
            delete json_object;
194
 
            squee.SetMessage("In branch "+it->first+"\n"
195
 
                            +squee.GetMessage());
196
 
            throw squee;
 
194
            exc.SetMessage("In branch "+it->first+"\n"
 
195
                            +exc.GetMessage());
 
196
            throw exc;
197
197
        }
198
198
    }
199
199
    return json_object;
211
211
                                              (const Json::Value& value) const {
212
212
    if (!value.isObject()) {
213
213
        std::string tp = JsonWrapper::ValueTypeToString(value.type());
214
 
        throw(Squeal(Squeal::recoverable,
 
214
        throw(Exception(Exception::recoverable,
215
215
                     "Comparison value must be a json object type - found "+tp,
216
216
                     "ObjectProcessor::HasUnknownBranches(...)"));
217
217
    }