comp.lang.ada
 help / color / mirror / Atom feed
* best practice: error handling
@ 2011-05-31 14:01 milouz
  2011-05-31 17:13 ` Vinzent Hoefler
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: milouz @ 2011-05-31 14:01 UTC (permalink / raw)


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 ?...




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-06-12  5:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-31 14:01 best practice: error handling milouz
2011-05-31 17:13 ` Vinzent Hoefler
2011-05-31 17:57   ` AdaMagica
2011-06-11 13:38   ` Yannick Duchêne (Hibou57)
2011-05-31 18:08 ` Jeffrey Carter
2011-05-31 20:02   ` Dmitry A. Kazakov
2011-05-31 20:35     ` Jeffrey Carter
2011-05-31 21:40       ` Dmitry A. Kazakov
2011-06-11 13:57     ` Yannick Duchêne (Hibou57)
2011-06-11 14:07       ` Dmitry A. Kazakov
2011-06-12  5:19         ` Randy Brukardt
2011-06-11 13:48   ` Yannick Duchêne (Hibou57)
2011-06-11 13:31 ` Yannick Duchêne (Hibou57)
2011-06-11 16:12   ` Simon Wright
2011-06-11 16:26   ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox