Hi

In the XSP snippet below I'd like to throw an exception from within <esql:no-results>. 
My questions are: how do I do this and will the exception be caught by the 
<map:handle-errors> section of the sitemap?

                        <esql:connection>
                                <esql:pool>mosaic</esql:pool>
                                <esql:execute-query>
                                        <esql:query>select groupname from v_tec_group 
g, v_tec_user2group u
where g.group_id = u.group_id and u.user_id = 
UPPER('<xsp:expr>userName</xsp:expr>')</esql:query>
                                        <esql:results>
                                                <esql:row-results>
                                                        <usergroup><esql:get-string 
column="groupname"/></usergroup>
                                                </esql:row-results>
                                        </esql:results>
                                        <esql:no-results>
                                                <usergroup>Sorry, could not find group 
for <xsp:expr>userName</xsp:expr></usergroup>
                                        </esql:no-results>
                                        <esql:error-results>
                                                <error_location>Could not obtain the 
group that the user belongs to</error_location>
                                                
<error_message><esql:get-message/></error_message>
                                                
<error_stacktrace><esql:get-stacktrace/></error_stacktrace>
                                        </esql:error-results>
                                </esql:execute-query>
                        </esql:connection>

Regards

Michael



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



---------------------------------------------------------------------
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]>

Reply via email to