<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/10/d04befa7beb24ef22b9d02a9066de8f7"
  from="Lex Stein &lt;stein@e...&gt;"
  author="Lex Stein"
  date="2003-10-08T18:04:37"
  subject="[Caml-list] line numbers in exceptions"
  prev="2003/10/381db41c1fe9cbbdbe0afbb6f271d21e"
  next="2003/10/7778131e9bb9dc8f0e37e810e13cd361"
  next-in-thread="2003/10/2e396edc1a3284cc4f0f4aa31e4c10b2"
  prev-thread="2003/10/8e30e035c3408ed133428b3777754c4d"
  next-thread="2003/10/23020cf3ef994a55faf67bc004acf3fd"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] line numbers in exceptions">
<msg 
  url="2003/10/d04befa7beb24ef22b9d02a9066de8f7"
  from="Lex Stein &lt;stein@e...&gt;"
  author="Lex Stein"
  date="2003-10-08T18:04:37"
  subject="[Caml-list] line numbers in exceptions">
<msg 
  url="2003/10/2e396edc1a3284cc4f0f4aa31e4c10b2"
  from="Basile Starynkevitch &lt;basile.starynkevitch@i...&gt;"
  author="Basile Starynkevitch"
  date="2003-10-08T18:44:11"
  subject="Re: [Caml-list] line numbers in exceptions">
</msg>
</msg>
</thread>

<contents>

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?

Thanks,
Lex

--
Lex Stein                     http://www.eecs.harvard.edu/~stein/
stein@eecs.harvard.edu        cell: 617-233-0246

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

