| 380 | } |
| 381 | |
| 382 | UniValue JSONRPCTransactionError(TransactionError terr, const std::string& err_string) |
| 383 | { |
| 384 | if (err_string.length() > 0) { |
| 385 | return JSONRPCError(RPCErrorFromTransactionError(terr), err_string); |
| 386 | } else { |
| 387 | return JSONRPCError(RPCErrorFromTransactionError(terr), TransactionErrorString(terr).original); |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | /** |
| 392 | * A pair of strings that can be aligned (through padding) with other Sections |