<?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/01/b4a8ce11a48f9cc6cbf897c6b7a41e47"
  from="Hans Ole Rafaelsen &lt;hans@s...&gt;"
  author="Hans Ole Rafaelsen"
  date="2003-01-21T07:49:42"
  subject="[Caml-list] String of &apos;_&apos; (any) exception?"
  prev="2003/01/c5aa93d21c0c93504dd2d03bd7e68762"
  next="2003/01/e7b5f94b933a24ff74e72c77f7de76f6"
  next-in-thread="2003/01/e7b5f94b933a24ff74e72c77f7de76f6"
  prev-thread="2003/01/c5aa93d21c0c93504dd2d03bd7e68762"
  next-thread="2003/01/ff00f860be700a943d78413e07a43f74"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] String of &apos;_&apos; (any) exception?">
<msg 
  url="2003/01/b4a8ce11a48f9cc6cbf897c6b7a41e47"
  from="Hans Ole Rafaelsen &lt;hans@s...&gt;"
  author="Hans Ole Rafaelsen"
  date="2003-01-21T07:49:42"
  subject="[Caml-list] String of &apos;_&apos; (any) exception?">
<msg 
  url="2003/01/e7b5f94b933a24ff74e72c77f7de76f6"
  from="Markus Mottl &lt;markus@o...&gt;"
  author="Markus Mottl"
  date="2003-01-21T09:32:11"
  subject="Re: [Caml-list] String of &apos;_&apos; (any) exception?">
</msg>
</msg>
</thread>

<contents>
Hello,

does it exist a way to get hold of a the string (if any) associated
with an exception, when the exception has been caught with the "_"
(any) exception?  What I am interested in is to get hold of the
information which the run-time normally prints when it exits.

let _ = List.nth [4; 5] 4

itherther [14] [08:30] [~] ./a.out 
Fatal error: exception Failure("nth")

I want to get the string produced, or the information needed to
produce it myself.

The intended usage for this is in a RPC server library, where the
application raise some exception.  It would be convenient to re-raise
this as an remote exception, or at least report it back to the client.


Kindest regards,

Hans Ole Rafaelsen
-------------------
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>

