summaryrefslogtreecommitdiff
path: root/ide/ideutils.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ide/ideutils.ml')
-rw-r--r--ide/ideutils.ml10
1 files changed, 7 insertions, 3 deletions
diff --git a/ide/ideutils.ml b/ide/ideutils.ml
index 138bf5f6..8b7840e3 100644
--- a/ide/ideutils.ml
+++ b/ide/ideutils.ml
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(* $Id: ideutils.ml 13323 2010-07-24 15:57:30Z herbelin $ *)
+(* $Id: ideutils.ml 13751 2010-12-24 09:56:05Z letouzey $ *)
open Preferences
@@ -31,12 +31,16 @@ let set_location = ref (function s -> failwith "not ready")
let pbar = GRange.progress_bar ~pulse_step:0.2 ()
+(* On a Win32 application with no console, writing to stderr raise
+ a Sys_error "bad file descriptor" *)
+let safe_prerr_endline msg = try prerr_endline msg with _ -> ()
+
let debug = Flags.debug
let prerr_endline s =
- if !debug then (prerr_endline s;flush stderr)
+ if !debug then try (prerr_endline s;flush stderr) with _ -> ()
let prerr_string s =
- if !debug then (prerr_string s;flush stderr)
+ if !debug then try (prerr_string s;flush stderr) with _ -> ()
let lib_ide_file f =
let coqlib = Envars.coqlib () in