From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4bd2a19251049b1,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!v8g2000yqb.googlegroups.com!not-for-mail From: milouz Newsgroups: comp.lang.ada Subject: best practice: error handling Date: Tue, 31 May 2011 07:01:19 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0b95a2a1-6e3d-4ad1-a832-e3099a9bce37@v8g2000yqb.googlegroups.com> NNTP-Posting-Host: 82.120.238.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1306850479 623 127.0.0.1 (31 May 2011 14:01:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 31 May 2011 14:01:19 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v8g2000yqb.googlegroups.com; posting-host=82.120.238.178; posting-account=2RsWdAoAAACKmfJMpyMjxrxuBA0nNyCZ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKRUAELSC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.24,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:20564 Date: 2011-05-31T07:01:19-07:00 List-Id: Hi, I'm wondering about the best way to handle errors in Ada when calling a function/procedure that may fails. For example, when programming on Unix systems in C, the called functions usually return a zero or positive value on success and -1 on failure, while setting a global variable (errno) to give some informations about the failure. What's the best way to deal with that kind of error in Ada ? Throwing an exception ? Returning some error code ? Passing a special parameter ?...