Skip to content
Snippets Groups Projects
Commit 02d7ebf7 authored by erwan's avatar erwan
Browse files

Chore: enhance sasa warning messages

parent de2afd46
No related branches found
No related tags found
No related merge requests found
......@@ -54,11 +54,11 @@ let (f: string list -> string * string -> unit) =
state_module state_module state_module ;
flush oc;
close_out oc;
Printf.printf "The file %s has been generated\n" register_file;
Printf.printf " [sasa] The file %s has been generated\n" register_file;
flush stdout
);
if Sys.file_exists state_file then (
Printf.printf "Warning: %s already exist.\n" state_file
Printf.printf " [sasa] Warning: %s already exist.\n" state_file
) else (
let oc = open_out state_file in
let entete = Mypervasives.entete2 "(*" "*)" SasaVersion.str SasaVersion.sha in
......@@ -70,6 +70,6 @@ let copy x = x
";
flush oc;
close_out oc;
Printf.printf "The file %s has been generated\n" state_file;
Printf.printf " [sasa] The file %s has been generated\n" state_file;
flush stdout
)
(* Time-stamp: <modified the 04/11/2019 (at 10:47) by Erwan Jahier> *)
(* Time-stamp: <modified the 14/01/2020 (at 09:36) by Erwan Jahier> *)
type t = {
......@@ -100,7 +100,8 @@ let myexit i = exit i
let seed_set args s =
(match s with
| Some i ->
Printf.fprintf stderr "The sasa random engine seed is set to %i\n" i;
if args.verbose>0 then
Printf.fprintf stderr " [sasa] The sasa random engine seed is set to %i\n%!" i;
Random.init i;
flush stderr;
| None -> ()
......@@ -117,11 +118,11 @@ let reset_the_seed_to_last args =
let ic = open_in f in
let seed = int_of_string (input_line ic) in
args.seed <- Some seed;
Printf.eprintf "Replay the sasa run using the seed in %s\n" f;
Printf.eprintf " [sasa] Replay the sasa run using the seed in %s\n" f;
flush stderr;
true
with _ ->
Printf.eprintf "W: cannot recover the seed in %s\n" f;
Printf.eprintf " [sasa] W: cannot recover the seed in %s\n" f;
flush stderr;
false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment