Open agarwal opened 9 years ago
I guess the problem is with Exception of (exn * serializable_out_value)
, in this case the exn
(the one coming from Async) carrying a closure. There is unfortunately no general way around it except to “degenerate” the exception if the serialization fails... :-(
"Degenerate" in what sense? Will it be somewhat of a general solution? I want to get to the point where oloop's behavior doesn't forever depend on the specific OCaml code being run. Ideally, the specific OCaml code should be irrelevant to oloop.
The only way I see of "degenerating" an exception in a generic way is to convert it to a string. Given that there is no way of reconstructing the exception from that, one needs to add a case to the possible outcomes.
Note that commit 1ef5c56 is also part of the solution.
If you have some time, you may want to track why using the compiler way of printing exceptions leads breaks the printing in a "funny" way.
Simplifying the example doesn't give the error. For instance, if you just always
raise Exit
, then you don't see this error.