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
[Caml-list] line numbers in exceptions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-08 (18:04)
From: Lex Stein <stein@e...>
Subject: [Caml-list] line numbers in exceptions

Hi, Is there a general strategy for getting the line number information
into exceptions. An exception call stack dump doesn't always work (for
example, with ocamlc -custom or ocamlopt). To figure out where my
exception is being raised, I'd like to paramaterize the exception by the
int line number. I don't want to enter this by hand because the exception
will change lines as I edit the code. Is there something like cpp's
__LINE__ and __FILE__ macros in OCaml? Or is the best way to just pump the
code through cpp before compilation?


Lex Stein                   cell: 617-233-0246

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: