Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Matching Unix_error
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-03 (11:17)
From: Michael Lahr <m.lahr@r...>
Subject: Matching Unix_error

i'm trying something like this:

let start () = 
    try pipe#run() with
    Unix.Unix_error(_,_,_) -> print_string "matched\n"
    | _ -> print_string "not matched\n"; raise e ;


where pipe is a http_client's pipeline.

The output is:

not matched
Fatal error: exception Unix.Unix_error(38, "connect", "")

what's wrong here? shouldn't the expression Unix.Unix_error(_,_,_) match
this error?
btw this error occurs only when running under oUnit.
Any clues?