Mailinglist Archive: yast-devel (81 mails)

< Previous Next >
Re: [yast-devel] About catching exceptions
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Thu, 29 Apr 2010 11:10:41 +0200
  • Message-id: <20100429091041.GA6194@xxxxxxxxxxxxx>
* Stefan Schubert <schubi@xxxxxxxxxx> [Apr 29. 2010 10:07]:
Hi,
ähm, as I am often running into this problem which exception has to be
handled or not, what is the result of this discussion ?

As always, it depends.

An exception, as its name implies, is an exceptional event and should
be treated as such in the UI.

That said, Ruby uses Exceptions quite extensively to report errors back
to the caller. Your code should handle such cases as good as possible.

Letting exceptions 'bubble up' to the generic exception handler we have
in ApplicationController is ok, if your code cannot continue otherwise
(i.e. policy not granted)

Klaus
---
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >