From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,818858e35b92bf47 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-11-01 05:13:02 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uhog.mit.edu!news.kei.com!bloom-beacon.mit.edu!paperboy.osf.org!rsalz From: rsalz@osf.org (Rich Salz) Newsgroups: comp.unix.osf.misc Subject: Re: error handling in DCE-based applications Date: 27 Oct 1994 16:26:57 GMT Organization: Open Software Foundation Message-ID: <38okch$d9u@paperboy.osf.org> References: NNTP-Posting-Host: sulphur.osf.org X-ORIGINAL-NEWSGROUPS: comp.unix.osf.misc In nayeri@bln.sel.alcatel.de writes: >Together with HP DCE a sample application is shipped called 'phone_db'. The >application contains the following code for error handling: ... >This seems to me to be an elegant way to handle errors in an >uniform way. No, it's a hack. Trying to handle both DCE status codes and native system errors (such as errno) is almost guaranteed to not be portable. However, the following might help: - Try always calling dce_error_inq_text; if the status param is -1 then it's either not DCE error code or the required message catalog isn't available. - If "random_status >>24" is 1 or 2, then it's in the space that DCE reserves for itself and DFS. Note that these get you more portable, not truly portable. Mixing errno-like things and DCE status codes is a mistake. /r$