assert(condition[, message]) patch
Tom S
h3r3tic at remove.mat.uni.torun.pl
Wed May 31 15:44:49 PDT 2006
Lars Ivar Igesund wrote:
> Because not all the users will have access to the source, or be inclined to
> see it. Unless the user get's a readable/understandable assert message
> he/she might not get enough information to actually reproduce a test case
> for the developer to peruse.
>
> Walter, this is a no-brainer, please put it in.
++votes;
/+
when you release your app to some testing team, you might want to leave
asserts in. While an error message containing the line number and
filename could be helpful, an additional message could be priceless.
E.g. assert(fileNameContainsNoSpaces(foo)); won't tell you that the
'foo' really was something like '^&^34 5+23 3(43D678[SAFer6_[]' which
might mean some mem corruption or forgetting a .dup somewhere in your
code. You'd instead go searching for some logic problems that wouldn't
solve the problem.
+/
--
Tomasz Stachowiak /+ a.k.a. h3r3tic +/
More information about the Digitalmars-d
mailing list