home *** CD-ROM | disk | FTP | other *** search
- Path: 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
-
-
-
- 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
-
-