Shell: fix error messages

This commit is contained in:
Grégoire Henry 2018-10-17 10:19:27 +02:00 committed by Raphaël Proust
parent c4e65879fc
commit 45a07d534f
No known key found for this signature in database
GPG Key ID: F4B685504488CEC0

View File

@ -527,7 +527,7 @@ module Make
let id_name = let id_name =
if name_s = "" then base_name else Format.asprintf "%s(%d)" base_name id in if name_s = "" then base_name else Format.asprintf "%s(%d)" base_name id in
if Hashtbl.mem table.instances name then if Hashtbl.mem table.instances name then
invalid_arg (Format.asprintf "Lwt_worker.launch: duplicate worker %s" full_name) ; invalid_arg (Format.asprintf "Worker.launch: duplicate worker %s" full_name) ;
let canceler = Lwt_canceler.create () in let canceler = Lwt_canceler.create () in
let buffer : kind buffer = let buffer : kind buffer =
match table.buffer_kind with match table.buffer_kind with
@ -577,13 +577,13 @@ module Make
| None, Launching _ -> | None, Launching _ ->
invalid_arg invalid_arg
(Format.asprintf (Format.asprintf
"Lwt_worker.state (%s[%a]): \ "Worker.state (%s[%a]): \
state called before worker was initialized" state called before worker was initialized"
base_name Name.pp w.name) base_name Name.pp w.name)
| None, (Closing _ | Closed _) -> | None, (Closing _ | Closed _) ->
invalid_arg invalid_arg
(Format.asprintf (Format.asprintf
"Lwt_worker.state (%s[%a]): \ "Worker.state (%s[%a]): \
state called after worker was terminated" state called after worker was terminated"
base_name Name.pp w.name) base_name Name.pp w.name)
| None, _ -> assert false | None, _ -> assert false