Article View: comp.sys.mac.oop.macapp3
Article #111Re: TAppl.InstallCohandler mo
From: De Waele Willy - Gent,BE,IHD
Date: Fri, 11 Dec 1992 18:04
Date: Fri, 11 Dec 1992 18:04
29 lines
1274 bytes
1274 bytes
Indeed, Mark, debug versions (of frameworks and our own applications - MacApp
and others) should be defensive programmed (which save a lot of time), i use
the following technique taking your example:
TFoo::Something()
{...
#if qDebug
if (!IsObject(aCohandler)) {
SysBreakStr("TFoo::Something - aCohandler is invalid!");
return; }
#endif
...
}
I prefer to jump into SADE with an own error message (eventually with the
returned OSErr error-code) than wasting my time searching the reason of the
crash which can occur later. I use the same technique before calling Failures
(Failure statement outside the if/endif).
SADE must be started up, but i think this is no problem because when working
with MacApp 3.x, we need a lot of meg's (i don't like limited resources! - *The
sky's the limit!*).
Of course there are alternatives (jumping into MacsBug, ...).
Willy
Technical Details
Message-ID:
<724097388.6934764@AppleLink.Apple.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!apple!applelink.apple.comShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!apple!applelink.apple.com From: DEWAELE.W@AppleLink.Apple.COM (De Waele Willy - Gent,BE,IHD) Newsgroups: comp.sys.mac.oop.macapp3 Subject: Re: TAppl.InstallCohandler mo Message-ID: <724097388.6934764@AppleLink.Apple.COM> Date: 11 Dec 92 18:04:00 GMT Sender: daemon@Apple.COM Organization: AppleLink Gateway Lines: 29