pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] problem using 0.135? on Win7pro.


From: Rhialto
Subject: Re: [Pan-users] problem using 0.135? on Win7pro.
Date: Wed, 5 Oct 2011 20:20:21 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]