flush_all ignore les erreurs

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5231 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2002-11-02 21:54:19 +00:00
parent c3e4b3c6dd
commit 449722dbf5
2 changed files with 3 additions and 3 deletions

View File

@ -244,7 +244,7 @@ external out_channels_list : unit -> out_channel list
let flush_all () =
let rec iter = function
[] -> ()
| a::l -> flush a; iter l
| a::l -> (try flush a with _ -> ()); iter l
in iter (out_channels_list ())
external unsafe_output : out_channel -> string -> int -> int -> unit

View File

@ -566,7 +566,7 @@ val flush : out_channel -> unit
output and standard error at the right time. *)
val flush_all : unit -> unit
(** Flush all opened output channels. *)
(** Flush all open output channels; ignore errors. *)
val output_char : out_channel -> char -> unit
(** Write the character on the given output channel. *)
@ -808,7 +808,7 @@ val exit : int -> 'a
(** Terminate the process, returning the given status code
to the operating system: usually 0 to indicate no errors,
and a small positive integer to indicate failure.
All opened output channels are flushed.
All open output channels are flushed with flush_all.
An implicit [exit 0] is performed each time a program
terminates normally. An implicit [exit 2] is performed if the program
terminates early because of an uncaught exception. *)