function()
{
hashmap mp=new HashMap();
try{
        //do some calcs
        mp.put("x","y");

}
catch(Exception e)
{

}
return HashMap;
}if it goes inside catch then
check for the return value hashTable's isEmpty method
if isEmpty is true then some error else success
> -----Original Message-----
> From: Papo Napolitano [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, November 19, 2001 1:12 AM
> To:   [EMAIL PROTECTED]
> Subject:      returning values...
>
> Hi!
>
> If have a function that returns some kind of object (a HashMap for
> example)... How can I do to return an error value if the function fails ??
>
>
> Cheers,
>
> Papo

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to