public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Sami Wagiaalla <swagiaal@redhat.com>
To: frysk@sourceware.org
Subject: Frysk exceptions
Date: Wed, 14 Nov 2007 21:26:00 -0000	[thread overview]
Message-ID: <473B67E7.3080902@redhat.com> (raw)

I have been meaning to write this for a while to clarify to my self the 
frysk strategy with respect to Exceptions and handling.

These are my practices; please tell me if you agree or disagree:

  * All frysk exceptions are (should ?) be unchecked exceptions ie 
extend RunTimeException.
  * Exceptions should never ever be ignored.
  * Exceptions can be ignored (handled) if they are specific enough (eg 
operation XYZFailedException)
  * Except for certain cases catch statements should be as specific as 
possible.
     So no catch(Exception e) statements, but 
catch(SymboleNotFoundException e).
  * Exceptions are better than returning null.

All other exceptions -which are not caught-, should be printed out in 
the most obvious way possible. This tells the use that there is a bug in 
frysk and that they should report it. The alternative (if it was logged, 
or cleaned up) is that the user assumes it is a non fatal error and 
continues to use frysk only to find it in a bad state much later. 
Resulting a difficult problem to debug.

             reply	other threads:[~2007-11-14 21:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-14 21:26 Sami Wagiaalla [this message]
2007-11-14 21:56 ` Phil Muldoon
2007-11-14 22:13   ` Sami Wagiaalla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=473B67E7.3080902@redhat.com \
    --to=swagiaal@redhat.com \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).