<br><font size=2 face="sans-serif">There was some discussion that users
may want to trap asserts so I have extended CoinError and introduced CoinAssert,
CoinAssertHint, CoinAssertDebug and CoinAssertDebugHint. &nbsp;The debug
versions are always null if -DNDEBUG is given as compile option and the
Hint versions contain some hint as to what the user error might be. &nbsp;With
the current build options these all translate to assert. &nbsp;But if -DCOIN_ASSERT
is given as compile option then they throw a CoinError exception which
the user can trap.</font>
<br>
<br><font size=2 face="sans-serif">So in Clp/Samples/addRows.cpp the code
is surrounded by:</font>
<br>
<br><font size=2 face="sans-serif">try {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.....
code</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; }</font>
<br><font size=2 face="sans-serif">&nbsp;catch (CoinError e) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; e.print();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; if (e.lineNumber()&gt;=0)</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp;std::cout&lt;&lt;&quot;This
was from a CoinAssert&quot;&lt;&lt;std::endl;</font>
<br><font size=2 face="sans-serif">} &nbsp;</font>
<br>
<br><font size=2 face="sans-serif">and the result is</font>
<br>
<br><font size=2 face="sans-serif">ClpModel::1372 : assertion 'numberColumns&lt;numberColumns_'
failed.</font>
<br><font size=2 face="sans-serif">Possible reason: rows having column
indices &gt;= numberColumns_</font>
<br>
<br><font size=2 face="sans-serif">I have replaced some asserts in Clp
by CoinAssert and will change any others which people want changed.</font>
<br>
<br><font size=2 face="sans-serif">CoinAssert can obviously be used by
anyone. &nbsp;COIN_ASSERT may be made default if optimized but it may not
work with all compilers and someone may be able to improve my #defines
to give more information e.g. I don't know how to get function name while
normal assert does.</font>
<br>
<br><font size=2 face="sans-serif">John Forrest</font>