~ajdobbs/maus/scifi-efficiency-2

« back to all changes in this revision

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

MergeĀ inĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
                                               (const Json::Value& json_array) {
43
43
    if (!json_array.isConvertibleTo(Json::arrayValue)) {
44
44
        // no memory allocated yet...
45
 
        throw(Exception(Exception::recoverable,
 
45
        throw(Exceptions::Exception(Exceptions::recoverable,
46
46
                    "Failed to resolve Json::Value of type "+
47
47
                    JsonWrapper::ValueTypeToString(json_array.type())+
48
48
                    " to array",
65
65
                if (RefManager::HasInstance())
66
66
                    RefManager::GetInstance().SetPointerAsValue(path, (*vec)[i]);
67
67
            }
68
 
        } catch (Exception exc) {
 
68
        } catch (Exceptions::Exception exc) {
69
69
            // if there's a problem, clean up before rethrowing the exception
70
70
            for (size_t j = 0; j < vec->size(); ++j) {
71
71
                if ((*vec)[j] != NULL) {
110
110
            if (RefManager::HasInstance())
111
111
                RefManager::GetInstance().SetPointerAsValue
112
112
                                               (cpp_array[i], GetPath(path, i));
113
 
        } catch (Exception exc) {
 
113
        } catch (Exceptions::Exception exc) {
114
114
            // if there's a problem, clean up before rethrowing the exception
115
115
            delete json_array;
116
116
            throw exc;
146
146
                                               (const Json::Value& json_array) {
147
147
    if (!json_array.isConvertibleTo(Json::arrayValue)) {
148
148
        // no memory allocated yet...
149
 
        throw(Exception(Exception::recoverable,
 
149
        throw(Exceptions::Exception(Exceptions::recoverable,
150
150
                    "Failed to resolve Json::Value of type "+
151
151
                    JsonWrapper::ValueTypeToString(json_array.type())+
152
152
                    " to array",
163
163
                                      Json::Value::ArrayIndex(i)]);
164
164
            (*vec)[i] = *data;
165
165
            delete data;
166
 
        } catch (Exception exc) {
 
166
        } catch (Exceptions::Exception exc) {
167
167
            // if there's a problem, clean up before rethrowing the exception
168
168
            delete vec;
169
169
            throw exc;
195
195
            JsonWrapper::Path::SetPath((*json_array)[Json::Value::ArrayIndex(i)],
196
196
                                       GetPath(path, i));
197
197
            delete data; // so we need to clean up here
198
 
        } catch (Exception exc) {
 
198
        } catch (Exceptions::Exception exc) {
199
199
            // if there's a problem, clean up before rethrowing the exception
200
200
            delete json_array;
201
201
            throw exc;
218
218
    using ReferenceResolver::JsonToCpp::VectorResolver;
219
219
    if (!json_array.isConvertibleTo(Json::arrayValue)) {
220
220
        // no memory allocated yet...
221
 
        throw(Exception(Exception::recoverable,
 
221
        throw(Exceptions::Exception(Exceptions::recoverable,
222
222
                    "Failed to resolve Json::Value of type "+
223
223
                    JsonWrapper::ValueTypeToString(json_array.type())+
224
224
                    " to array",
243
243
                    RefManager::GetInstance().AddReference(res);
244
244
                }
245
245
            }
246
 
        } catch (Exception exc) {
 
246
        } catch (Exceptions::Exception exc) {
247
247
            // if there's a problem, clean up before rethrowing the exception
248
248
            delete vec;
249
249
            throw exc;