Skip to content

Commit

Permalink
doc: unify man pages error sections
Browse files Browse the repository at this point in the history
Change all man pages to follow the style of doc/lightning-pay.7.md for
the section on returning errors.

Changelog-None
  • Loading branch information
vasild authored and ZmnSCPxj committed Jan 21, 2020
1 parent 89466f0 commit 3cf91b2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 81 deletions.
25 changes: 6 additions & 19 deletions doc/lightning-disconnect.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions doc/lightning-disconnect.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,11 @@ RETURN VALUE

On success, an empty object is returned.

ERRORS
------

If *id* is invalid, an error message will be returned:

{ "code" : -1, "message" : "Peer not connected" }

If the peer has an active channel and *force* is not set, an error
message will be returned:
On error the returned object will contain `code` and `message` properties,
with `code` being one of the following:

{ "code" : -1, "message" : "Peer is in state CHANNELD_NORMAL" }
- -32602: If the given parameters are wrong.
- -1: Catchall nonspecific error.

AUTHOR
------
Expand Down
24 changes: 8 additions & 16 deletions doc/lightning-listchannels.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions doc/lightning-listchannels.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,10 @@ through this channel.
If *short\_channel\_id* or *source* is supplied and no matching channels
are found, a "channels" object with an empty list is returned.

ERRORS
------

If *short\_channel\_id* is not a valid short\_channel\_id, an error
message will be returned:

{ "code" : -32602,
"message" : "'short_channel_id' should be a short channel id, not '...'" }
On error the returned object will contain `code` and `message` properties,
with `code` being one of the following:

Similarly if *source* is not a valid pubkey.
- -32602: If the given parameters are wrong.

AUTHOR
------
Expand Down
22 changes: 4 additions & 18 deletions doc/lightning-listpeers.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions doc/lightning-listpeers.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,10 @@ peer at the specified *level*
If *id* is supplied and no matching nodes are found, a "peers" object
with an empty list is returned.

ERRORS
------

If *id* is not a valid public key, an error message will be returned:

{ "code" : -32602, "message" : "'id' should be a pubkey, not '...'" }

If *level* is not a valid log level, an error message will be returned:
On error the returned object will contain `code` and `message` properties,
with `code` being one of the following:

{ "code" : -32602, "message" : "'level' should be 'io', 'debug', 'info', or 'unusual', not '...'" }
- -32602: If the given parameters are wrong.

AUTHOR
------
Expand Down

0 comments on commit 3cf91b2

Please sign in to comment.