From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f8a1,e7e13c943c611b62 X-Google-Attributes: gid10f8a1,public X-Google-Thread: 102b75,be3d6a6131c61fa7 X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,be3d6a6131c61fa7 X-Google-Attributes: gid1164f8,public From: "Andy Glew" Subject: Exceptions, Error codes, and Wrappers Date: 1999/04/18 Message-ID: <7fdlck$114a$1@news.doit.wisc.edu>#1/1 X-Deja-AN: 468074525 References: <36E9F2A0.9A401A09@pacific.net.sg> <7cj96m$h07$1@plonk.apk.net> <7eih45$ln2$1@news.doit.wisc.edu> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: University of Wisconsin, Madison Newsgroups: comp.arch,comp.sys.dec,vmsnet.alpha >>: #if DEBUG >>: #define FLAG_ERROR(error) if(error!=noErr) Debugger() >>: #else >>: #define FLAG_ERROR(error) >>: #endif > >As I pointed out elsewhere, that's irrelevant when you are making calls >into the OS and problems are returned via error numbers. Unless, I guess, >you put a wrapper around every such call throwing an error, which is >basically identical to my scheme. #define CATCH_ALL( errfunc ) try { errfunc } catch ( * ) { Debugger(); }