R: Exceptions design

2007-02-05 Thread Marcello Savino
Marcello -Messaggio originale- Da: Francisco Exposito Aguilera [mailto:[EMAIL PROTECTED] Inviato: domenica 4 febbraio 2007 18.01 A: user@struts.apache.org Oggetto: Exceptions design Hello all, I have a doubt about how design the exceptions in my struts project. I have the action classes

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

Exceptions design

2007-02-04 Thread Francisco Exposito Aguilera
Hello all, I have a doubt about how design the exceptions in my struts project. I have the action classes and the bean classes. The action classes execute methods from bean classes, which connect to the database. Supposing I am trying to create a user in one of my web pages and the user I

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

Re: Exceptions design

2007-02-04 Thread Francisco Exposito Aguilera
From: Dave Newton [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: Struts Users Mailing List user@struts.apache.org 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

Re: Exceptions design

2007-02-04 Thread Francisco Exposito Aguilera
-To: Struts Users Mailing List user@struts.apache.org To: Struts Users Mailing List user@struts.apache.org 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

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 request

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