This just bit us (Frama-C) on a real run of analysis, and understanding the problem and its root was quite a challenge. On top of a mention in the documentation, detecting and warning at compile-time that the type of the marshalled value can contain exceptions somewhere would be a great help.

Work on the raise_variants branch changes the representation of exception tags and makes it possible to detect them during marshaling (tag = Object_tag, size = 2, first field points to a string value).