Mark Beckwith
7f437715d5
Added error code parameter to command_fail
...
Until now, `command_fail()` reported an error code of -1 for all uses.
This PR adds an `int code` parameter to `command_fail()`, requiring the
caller to explicitly include the error code.
This is part of #1464 .
The majority of the calls are used during parameter validation and
their error code is now JSONRPC2_INVALID_PARAMS.
The rest of the calls report an error code of LIGHTNINGD, which I defined to
-1 in `jsonrpc_errors.h`. The intention here is that as we improve our error
reporting, all occurenaces of LIGHTNINGD will go away and we can eventually
remove it.
I also converted calls to `command_fail_detailed()` that took a `NULL` `data`
parameter to use the new `command_fail()`.
The only difference from an end user perspecive is that bad input errors that
used to be -1 will now be -32602 (JSONRPC2_INVALID_PARAMS).
2018-05-26 12:17:36 +02:00
..
2018-05-15 15:04:34 +02:00
2018-05-10 02:28:44 +00:00
2018-05-10 02:28:44 +00:00
2018-04-25 12:34:55 +02:00
2018-04-25 12:34:55 +02:00
2018-03-25 23:54:21 +00:00
2018-03-25 23:54:21 +00:00
2017-08-29 17:54:14 +02:00
2017-08-29 17:54:14 +02:00
2018-04-25 12:34:55 +02:00
2018-04-06 14:26:53 +02:00
2017-08-29 17:54:14 +02:00
2017-10-11 11:54:50 +02:00
2017-12-21 11:05:38 +00:00
2018-03-25 23:54:21 +00:00
2018-05-05 17:55:10 +02:00
2017-12-13 22:46:10 +01:00
2017-10-20 18:31:32 +02:00
2017-10-20 18:31:32 +02:00
2018-05-10 02:28:44 +00:00
2017-08-29 17:54:14 +02:00
2018-05-10 02:28:44 +00:00
2018-02-13 12:10:35 +01:00
2018-03-14 02:19:37 +00:00
2018-03-14 02:19:37 +00:00
2018-04-05 18:17:55 +02:00
2018-04-03 14:03:28 +02:00
2018-03-25 23:54:21 +00:00
2017-11-16 17:40:57 +01:00
2018-01-29 04:46:54 +00:00
2017-10-26 12:53:09 +02:00
2018-05-15 15:04:34 +02:00
2018-03-14 02:19:37 +00:00
2017-10-26 12:53:09 +02:00
2017-12-21 11:05:38 +00:00
2017-11-01 01:09:23 +00:00
2017-11-01 01:09:23 +00:00
2017-08-29 17:54:14 +02:00
2018-02-08 22:49:34 +01:00
2017-12-21 11:05:38 +00:00
2017-12-21 11:05:38 +00:00
2018-02-08 19:07:12 +01:00
2018-02-08 19:07:12 +01:00
2018-03-28 11:22:05 +02:00
2018-04-05 19:07:23 +02:00
2018-04-05 19:07:23 +02:00
2018-04-05 19:07:23 +02:00
2018-04-05 19:07:23 +02:00
2018-03-28 11:22:05 +02:00
2018-03-28 11:22:05 +02:00
2018-04-08 08:26:00 +00:00
2018-03-26 23:35:56 +00:00
2017-11-16 17:40:57 +01:00
2017-08-29 17:54:14 +02:00
2017-11-23 23:10:08 +01:00
2017-11-16 17:40:57 +01:00
2018-05-10 02:28:44 +00:00
2018-03-25 23:54:21 +00:00
2017-12-20 12:43:10 +01:00
2017-08-29 17:54:14 +02:00
2017-08-29 17:54:14 +02:00
2018-03-27 23:18:48 +00:00
2018-02-23 18:02:00 +01:00
2018-02-23 18:02:00 +01:00
2018-04-26 05:47:57 +00:00
2018-04-26 05:47:57 +00:00
2018-04-26 05:47:57 +00:00
2018-01-15 06:35:02 +00:00
2017-08-29 17:54:14 +02:00
2018-02-22 12:24:26 +01:00
2018-02-22 12:24:26 +01:00
2017-08-29 17:54:14 +02:00
2017-08-29 17:54:14 +02:00
2018-04-26 05:47:57 +00:00
2018-04-26 05:47:57 +00:00
2018-05-09 04:43:21 +00:00
2018-05-09 04:43:21 +00:00
2018-03-25 23:54:21 +00:00
2017-08-29 17:54:14 +02:00
2018-02-08 19:07:12 +01:00
2018-02-08 19:07:12 +01:00
2018-05-10 02:28:44 +00:00
2018-02-08 19:07:12 +01:00
2018-05-10 02:28:44 +00:00
2018-05-10 02:28:44 +00:00
2018-04-03 14:03:28 +02:00
2018-04-03 14:03:28 +02:00
2018-03-16 00:16:10 +00:00
2017-08-29 17:54:14 +02:00
2018-03-06 19:26:21 +01:00
2018-05-07 22:37:28 +02:00
2018-04-27 14:02:59 +02:00
2018-04-27 14:02:59 +02:00
2018-02-08 19:07:12 +01:00
2018-03-27 23:17:17 +00:00
2018-04-04 02:32:44 +00:00
2018-01-29 03:22:27 +00:00
2018-05-26 12:17:36 +02:00
2018-05-03 18:20:20 +02:00
2018-03-16 01:17:40 +00:00
2018-01-29 04:46:54 +00:00
2018-05-15 05:30:43 +00:00
2018-05-11 09:15:54 +00:00
2017-12-21 14:33:27 +01:00
2017-12-13 03:10:04 +00:00