diff options
author | Stephane Glondu <steph@glondu.net> | 2011-04-19 16:44:20 +0200 |
---|---|---|
committer | Stephane Glondu <steph@glondu.net> | 2011-04-19 16:44:20 +0200 |
commit | 9d27ae09786866b6e3d7b79d1fa7667e5e2aa309 (patch) | |
tree | a418d1edb3d53cdb4185b9719b7a70822cf5a24d /ide/ideutils.ml | |
parent | 6b691bbd2101fd39395c0d2135fd7c06a8915e14 (diff) |
Imported Upstream version 8.3.pl2upstream/8.3.pl2
Diffstat (limited to 'ide/ideutils.ml')
-rw-r--r-- | ide/ideutils.ml | 10 |
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 |