Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marshal.mli should document the problem of marshaling exceptions. #6154

Closed
vicuna opened this issue Sep 3, 2013 · 1 comment
Closed

marshal.mli should document the problem of marshaling exceptions. #6154

vicuna opened this issue Sep 3, 2013 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Sep 3, 2013

Original bug ID: 6154
Reporter: furuse
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2015-12-11T18:24:02Z)
Resolution: duplicate
Priority: normal
Severity: trivial
Version: 4.00.1
Fixed in version: 4.01.0+dev
Category: standard library
Duplicate of: #4978
Related to: #7413

Bug description

Marshaling exception values do not work well in OCaml (see #8399 ). This should be documented in marshal.mli.

@vicuna
Copy link
Author

vicuna commented Sep 3, 2013

Comment author: @gasche

Wojciech fixed this around commit 13568, included in 4.01. The documentation now reads:

OCaml exception values (of type [exn]) returned by the unmarhsaller
should not be pattern-matched over through [match ... with] or [try
... with], because unmarshalling does not preserve the information
required for matching their exception constructor. Structural
equalities with other exception values, or most other uses such as
Printexc.to_string, will still work as expected.

(I just noticed the typo in "unmarhsaller". Will fix.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants