If you are using modular Database actions you can turn of the throw of exceptions:
Here is the config: <!-- Modular DB --> <map:action name="mod-db-add" src="org.apache.cocoon.acting.modular.DatabaseAddAction"> <descriptor>database.xml</descriptor> <input>request-param</input> <output>request-attr</output> <throw-exception>true</throw-exception> </map:action> <map:action name="mod-db-upd" src="org.apache.cocoon.acting.modular.DatabaseUpdateAction"> <descriptor>database.xml</descriptor> <input>request-param</input> <output>request-attr</output> <throw-exception>false</throw-exception> </map:action> <map:action name="mod-db-del" src="org.apache.cocoon.acting.modular.DatabaseDeleteAction"> <descriptor>database.xml</descriptor> <input>request-param</input> <output>request-attr</output> <throw-exception>false</throw-exception> </map:action> Antonio Gallardo boessem dijo: > Hi, > > Thank for answering. > > totaly right. My problem in this case is, that i dont want the common > internal server error message, rather than my own, to explain what > mistake took place. > > Here is my code, to give you a better idea of what I want. > > <esql:execute-query> > <esql:query> > insert > into > anmeldung > > (studid,matr,vorname,name,email,id,klausur) > values > > ('<xsp-request:get-parameter name="matr"/><xsp-request:get-parameter > name="id"/>','<xsp-request:get-parameter > name="matr"/>','<xsp-request:get-parameter > name="vorname"/>','<xsp-request:get-parameter > name="name"/>','<xsp-request:get-parameter > name="email"/>','<xsp-request:get-parameter > name="id"/>','<xsp-request:get-parameter name="fach"/>') > </esql:query> > <esql:error-results> > <error>An error > occurred</error> > </esql:error-results> > </esql:execute-query> > > is there maybe something to change within the pipeling, or some where > else, or is my source code just wrong? > > When I do it this way, there is still the same cocoon pre-set error > message. > > -----Ursprüngliche Nachricht----- > Von: Olivier GUCKERT [mailto:[EMAIL PROTECTED]] > Gesendet: Dienstag, 3. Dezember 2002 14:07 > An: [EMAIL PROTECTED] > Betreff: Re: Problems using the <esql:error-results> tag > >> Hi, > > > >> I am working on a simple online registration tool, to register for > exams. That for I have got a mysql database server, to >insert and read > the data. > > > >> Within that database I have set a primary key that is made out of lets > say the studentid, and the id from the exam. I have > set it to primary > for the reason, that no double entry >> can be done. > > > >> So if a student wants to register to one exam twice, there is an > exception saying, that there is a Duplicate entry for that > field. Now > instead of throwing out the exception within >> cocoon, I want to display something like, “an error occurs” instead”. > That for I used the tag <esql:error-results> to give a > different > message than that from cocoon. > > If i understand tour problem, you just have to do : > <esql:error-results> > <error> > an error occurs > </error> > </esql:error-results> > > >> Could anybody give me a hint how that could be done. > > If it doesn't match, you just have to telle me more ... > > Olivier GUCKERT > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>