Re: Exceptions design

2007-02-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Piero Sartini wrote: > I have a rule: If something is defined and I know it will happen often, it > should not be an exception. It is a path in the application. There's always the (slim) possibility that the user will not be found during the lo

Re: Exceptions design

2007-02-04 Thread Piero Sartini
Hello, it sure is a matter of taste - but I think its not good to use exceptions for this kind of things. After all "User not found" is not an _exception_. Its a well defined case and it happens frequently. (Except you rely on that the user exists, eg. in step 2 of a registration process) I ha

Re: Exceptions design

2007-02-04 Thread Dave Newton
--- Francisco Exposito Aguilera wrote: > I am doing just now a part for an administrator user > and I want to show the error most clear as possible. Oh, if it's for an admin that would understand and be able to do something, then sure, be as detailed as you want :) > a) I must do an extra reque

Re: Exceptions design

2007-02-04 Thread Francisco Exposito Aguilera
Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: Exceptions design Date: Sun, 4 Feb 2007 09:41:23 -0800 (PST) --- Francisco Exposito Aguilera wrote: > What is the best way to show the user this sql error? I'm skeptical that you'd want to sho

Re: Exceptions design

2007-02-04 Thread Francisco Exposito Aguilera
From: Dave Newton <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: Exceptions design Date: Sun, 4 Feb 2007 09:41:23 -0800 (PST) --- Francisco Exposito Aguilera wrote: > What is the best way to show the user this sql er

Re: Exceptions design

2007-02-04 Thread Dave Newton
--- Francisco Exposito Aguilera wrote: > What is the best way to show the user this sql error? I'm skeptical that you'd want to show the *user* an SQL error; my experience has been that it's best to wrap up such exceptions in an application-specific exception and report a general system error (or