Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] error messages to stdout?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Remi VANICAT <vanicat@l...>
Subject: Re: [Caml-list] error messages to stdout?
Doug Bagley <doug@bagley.org> writes:

> I've been learning how to use Ocaml for writing scripts, and I've
> encountered a small problem.
> 
> By "scripts", I mean they have the canonical custom toplevel in the
> interpreter line.  They also dynamically load libs.
> 
> I had updated one lib and not another that depended on it, so I got a
> message like so, to stdout:
> 
>  File /usr/local/lib/ocaml/contrib/fs_lib.cma is not up-to-date with respect to
>  interface Pcre
> 
> The problem was that I piped my ocaml script's output to a file that
> was supposed to just contain data, and then I graphed it, so the error
> message showed up in a graph, which was kind of funny but not what I
> expected. I use pipes and filters a lot, so this could really put a
> wrench in my plans.
> 
> Anyway, it would be like, cool, if I could get those errors going to
> stderr instead, or be enlightened as to the error of my
> ways. Thanks.

you should compile your program to (at least) bytecode code. It will
be faster, and those kind of error will only exist at compile time,
not at execution time...
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr