| Anonymous | Login | Signup for a new account | 2013-05-22 20:35 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0005344 | OCaml | OCaml general | public | 2011-08-19 15:28 | 2012-09-25 20:06 | |||
| Reporter | lpw25 | |||||||
| Assigned To | xclerc | |||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.12.1 | |||||||
| Target Version | Fixed in Version | 3.12.1+dev | ||||||
| Summary | 0005344: Confusing exception printing | |||||||
| Description | Fatal exceptions are sometimes printed in an unexpected way. For example compiling the following: type test = A of int * string | B of int * string exception TestExc of test let _ = raise (TestExc (A(3, "HelloWorld"))) and running it produces: bash-3.2$ ocamlc testA.ml bash-3.2$ ocamlrun a.out Fatal error: exception TestA.TestExc(3, "HelloWorld") Whereas this program: type test = A of int * string | B of int * string exception TestExc of test let _ = raise (TestExc(B(3, "HelloWorld"))) produces this: bash-3.2$ ocamlc testB.ml bash-3.2$ ocamlrun a.out Fatal error: exception TestB.TestExc(_) The second example is probably the correct behaviour. The problem seems to be caused by lines 60-66 in caml_format_exception in byterun/printexc.c, which are supposed to handle printing exceptions like Match_Failure and Assert_Failure. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-08-19 15:28 | lpw25 | New Issue | |
| 2011-09-08 10:35 | xclerc | Status | new => resolved |
| 2011-09-08 10:35 | xclerc | Fixed in Version | => 3.12.1+dev |
| 2011-09-08 10:35 | xclerc | Resolution | open => fixed |
| 2011-09-08 10:35 | xclerc | Assigned To | => xclerc |
| 2012-09-25 20:06 | xleroy | Status | resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |