You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5344 Reporter:@lpw25 Assigned to:@xclerc Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z) Resolution: fixed Priority: normal Severity: minor Version: 3.12.1 Fixed in version: 3.12.1+dev Category: ~DO NOT USE (was: OCaml general) Monitored by:@lpw25
Bug description
Fatal exceptions are sometimes printed in an unexpected way.
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.
The text was updated successfully, but these errors were encountered:
Original bug ID: 5344
Reporter: @lpw25
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.12.1
Fixed in version: 3.12.1+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @lpw25
Bug 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.
The text was updated successfully, but these errors were encountered: