Client: do not eat some error messages.
This commit is contained in:
parent
cdb34ca7d3
commit
8264ec111a
@ -42,11 +42,14 @@ let main () =
|
|||||||
Lwt.catch
|
Lwt.catch
|
||||||
(fun () ->
|
(fun () ->
|
||||||
Client_node_rpcs.Blocks.protocol cctxt block)
|
Client_node_rpcs.Blocks.protocol cctxt block)
|
||||||
(fun _ ->
|
(fun exn ->
|
||||||
cctxt.message
|
cctxt.warning
|
||||||
"\n\
|
"Error trying to acquire the protocol version from the node: %s."
|
||||||
The connection to the RPC server failed, \
|
(match exn with
|
||||||
using the default protocol version.\n" >>= fun () ->
|
| Failure msg -> msg
|
||||||
|
| exn -> Printexc.to_string exn) >>= fun () ->
|
||||||
|
cctxt.warning
|
||||||
|
"Using the default protocol version." >>= fun () ->
|
||||||
Lwt.return Client_bootstrap.Client_proto_main.protocol)
|
Lwt.return Client_bootstrap.Client_proto_main.protocol)
|
||||||
>>= fun version ->
|
>>= fun version ->
|
||||||
let commands =
|
let commands =
|
||||||
@ -81,7 +84,7 @@ let main () =
|
|||||||
Format.eprintf "Command failed, %s.\n%!" message ;
|
Format.eprintf "Command failed, %s.\n%!" message ;
|
||||||
Lwt.return 1
|
Lwt.return 1
|
||||||
| Failure message ->
|
| Failure message ->
|
||||||
Format.eprintf "%s\n%!" message ;
|
Format.eprintf "Fatal error: %s\n%!" message ;
|
||||||
Lwt.return 1
|
Lwt.return 1
|
||||||
| exn ->
|
| exn ->
|
||||||
Format.printf "Fatal internal error: %s\n%!"
|
Format.printf "Fatal internal error: %s\n%!"
|
||||||
|
Loading…
Reference in New Issue
Block a user