mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
jsonrpc: make error codes an enum.
This allows GDB to print values, but also allows us to use them in 'case' statements. This wasn't allowed before because they're not constant terms. This also made it clear there's a clash between two error codes, so move one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: JSON-RPC: Error code from bcli plugin changed from 400 to 500.
This commit is contained in:
@@ -239,7 +239,7 @@ void NORETURN plugin_exit(struct plugin *p, int exitcode);
|
||||
* NULL, data can be NULL; otherwise it must be a JSON object. */
|
||||
struct command_result *WARN_UNUSED_RESULT
|
||||
command_done_err(struct command *cmd,
|
||||
errcode_t code,
|
||||
enum jsonrpc_errcode code,
|
||||
const char *errmsg,
|
||||
const struct json_out *data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user