digitalmars.D - Temporary suggestion for assert
- Ant (16/16) Apr 21 2005 until the assert can print out more usefull information can we have
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (6/9) Apr 22 2005 See http://www.digitalmars.com/techtips/unittests.html ?
- Ant (3/11) Apr 22 2005 Thanks, I guess I can do with that!
- Sean Kelly (5/8) Apr 23 2005 Why not put:
until the assert can print out more usefull information can we have
the program exit with something gdb can catch so we can print a
backtrace?
look out I'm doing:
String insert(String string, int pos)
in
{
if ( (pos < 0) || (pos >= length) )
{
printf("String.insert pos=%d, length=%d\n", pos, length);
String s; s.split();
}
}
body
:p
Ant
Apr 21 2005
Ant wrote:until the assert can print out more usefull information can we have the program exit with something gdb can catch so we can print a backtrace?See http://www.digitalmars.com/techtips/unittests.html ? But I think Walter said that filename and linenumber is all that is needed, and the reason why assert doesn't allow a message to be attached to it: assert(exp,"why"); --anders
Apr 22 2005
Anders F Björklund wrote:Ant wrote:Thanks, I guess I can do with that! Antuntil the assert can print out more usefull information can we have the program exit with something gdb can catch so we can print a backtrace?See http://www.digitalmars.com/techtips/unittests.html ?
Apr 22 2005
In article <d49qqh$1dd5$1 digitaldaemon.com>, Ant says...until the assert can print out more usefull information can we have the program exit with something gdb can catch so we can print a backtrace?Why not put: asm int 3; in the assert handler. Sean
Apr 23 2005









Ant <duitoolkit yahoo.ca> 