<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. 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. With
the current build options these all translate to assert. 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"> .....
code</font>
<br><font size=2 face="sans-serif"> }</font>
<br><font size=2 face="sans-serif"> catch (CoinError e) {</font>
<br><font size=2 face="sans-serif"> e.print();</font>
<br><font size=2 face="sans-serif"> if (e.lineNumber()>=0)</font>
<br><font size=2 face="sans-serif"> std::cout<<"This
was from a CoinAssert"<<std::endl;</font>
<br><font size=2 face="sans-serif">} </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<numberColumns_'
failed.</font>
<br><font size=2 face="sans-serif">Possible reason: rows having column
indices >= 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. 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>