Assertions often detect problems after the state of the program becomes corrupted. Exceptions are generally assumed to occur prior an operation that may cause corruption such that the state of the system is known at whatever point the exception is handled.<br>
<br><div class="gmail_quote">On Sat, Jun 12, 2010 at 9:43 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
On Jun 11, 2010, at 3:35 PM, Patrick Walton wrote:<br>
<br>
> Hi,<br>
><br>
> This patch builds on the previous one (llvm-pcwalton-configurable-assertions.diff) and transforms assertions into exceptions in the OCaml bindings.<br>
<br>
I'm not sure this is the right way to go.  Assertions should *never* trigger, they are not a checked condition.  Transforming them into an exception is incorrect, because in certain build modes assertions are noops (the checks are not compiled in).<br>

<br>
-Chris<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br>