[Actionframework-users] Tryin to catch component exceptions
Status: Inactive
Brought to you by:
ptoman
From: <ser...@is...> - 2004-05-13 15:25:44
|
Hi all!! I'd like to catch some exceptions that my application may throw under=20 certain circumstances, in order to control a little bit the flow of the=20 app and avoid Tomcat to stop suddenly while posting a "the document=20 contains no data" message. The thing is that i have 3 <on-exception> elements under all the=20 <action>s tags, and the thing goes ok. The elements are these: <on-exception class=3D"java/lang/NullPointerException" assign-to=3D"npe"=20 show-template=3D"error.vm"> <output-variable name=3D"obj" value=3D"$npe"/> </on-exception> =20 =20 <on-exception class=3D"java/lang/NumberFormatException" assign-to=3D"nfe"= =20 show-template=3D"error.vm"> <output-variable name=3D"obj" value=3D"$nfe"/> </on-exception> =20 <on-exception class=3D"raiz/ExcepcionErrorDatos" assign-to=3D"eed"=20 show-template=3D"error_datos.vm"> <output-variable name=3D"mensaje" value=3D"$eed.getMessage()"/> </on-exception> However, when i add a java.lang.Exception and a=20 org.apache.commons.dbcp.SQLNestedException (both at the end), the page=20 fails and doest show anything. Only putting those <on-exception>s tags=20 makes the app fail, coz when i comment them, it goes fairly well. What am i doing wrong? What should i do to catch SQLNestedException and=20 Exception? Thanx in advance........ --=20 Seraf=EDn Orill=E1n Chaparro Isotrol S.A. Avda. de la Innovaci=F3n s/n +34 955 036 800 e-mail: ser...@is... |