On Wed 05 Oct 2011 at 12:32:14 +0000, Bruce Bowler wrote:
> Is it 
> possible to get the assertion to provide a more descriptive error than "an 
> assertion failed"?  Non-descriptive errors remind me of the old DOS 
> "general protection fault" errors...

In a way, it is an exact description of what happens. At a certain point
in the code, it is asserted that a certain expression should always be
true, and if it fails, you get the message. It is even friendly enough
to include the actual expression that should have been true but wasn't,
and the file name and line number. If you want more, you'll have to code
something yourself, along the lines of

instead of      assert(foo);

have            if (!(foo)) {
                    printf("foo is not true! file X, line Y\n");
                    printf("Other values that may be of interest:
                                bar=%d, baz=%f, quux=%p", bar, baz, quux);
                }

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
\X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor

_______________________________________________
Pan-users mailing list
Pan-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pan-users

Reply via email to