From: Eijiro Sumii <eijiro.sumii@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Re: line number in exception history?
Date: Mon, 10 Oct 2005 12:24:33 +0900 [thread overview]
Message-ID: <a4d0794e0510092024i643b546p886f3e1453540b5@mail.gmail.com> (raw)
In-Reply-To: <a4d0794e0510091922r14b715f2kdfb6adc56fab30b8@mail.gmail.com>
P.S. The following variant is even more strange. (Look at the
"re-raised" line, please.)
> cat foo.ml
let fooFunction x =
if x > 0 then x - 1
else raise (invalid_arg "Give me positive!")
> cat bar.ml
let barFunction x =
let y = x + 1 in
Foo.fooFunction y
> cat main.ml
let f () = ()
let test () =
try
Bar.barFunction (-10)
with e -> raise e
let g y = y + 1
let () =
f ();
let ret = test () in
print_int (ret + 100)
> ocamlc -g foo.ml bar.ml main.ml -o test
> env OCAMLRUNPARAM=b ./test
Fatal error: exception Invalid_argument("Give me positive!")
Raised at file "pervasives.ml", line 22, character 17
Re-raised at file "foo.ml", line 3, character 46
Called from file "main.ml", line 5, character 25
Re-raised at file "main.ml", line 1, character 11
Called from file "main.ml", line 13, character 2
next prev parent reply other threads:[~2005-10-10 3:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-10 2:22 Eijiro Sumii
2005-10-10 3:24 ` Eijiro Sumii [this message]
2005-10-11 9:09 ` [Caml-list] " Xavier Leroy
2005-10-11 11:13 ` Eijiro Sumii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4d0794e0510092024i643b546p886f3e1453540b5@mail.gmail.com \
--to=eijiro.sumii@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=sumii@ecei.tohoku.ac.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).