| 72 | { |
| 73 | unsigned int i = 0; |
| 74 | BOOST_FOREACH(UniValue::VType t, typesExpected) |
| 75 | { |
| 76 | if (params.size() <= i) |
| 77 | break; |
| 78 | |
| 79 | const UniValue& v = params[i]; |
| 80 | if (!((v.type() == t) || (fAllowNull && (v.isNull())))) |
| 81 | { |
| 82 | string err = strprintf("Expected type %s, got %s", |
| 83 | uvTypeName(t), uvTypeName(v.type())); |
| 84 | throw JSONRPCError(RPC_TYPE_ERROR, err); |
| 85 | } |
| 86 | i++; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | void RPCTypeCheckObj(const UniValue& o, |
nothing calls this directly
no test coverage detected