Re: R: Re: Curve building with depo, futures and swaps

Posted by Kim Kuen Tang on
URL: http://quantlib.414.s1.nabble.com/R-Re-Curve-building-with-depo-futures-and-swaps-tp6986p6989.html


Hi tarpanelli,

Luigi Ballabio schrieb:
>> IMHO QuantLib throws every error with a message, indicating the location
>> or the reason for the runtime error. Are you sure that this is the
>> entire message?
>>    
>
> Yes, it seems like the error wasn't caught.  What does your catch block
> do, and what kind of errors does it catch?
>  

just want to make sure that u know how to catch all exceptions.

You need to add a catch block with this signature:

catch(...)

By doing this you will be sure that u really catch all and really all
errors.

# include <boost/cstdlib.hpp>

int main()
{
    try{
       // ur code
        return boost::exit_success;;
    }
    catch(std::exception& e)
    {
        std::cout<<e.what();
        return boost::exit_failure;
    }
    catch(...)
    {
        std::cout<<"UNKNOWN ERROR";
        return boost::exit_failure;
    }
}

> Luigi
>
>
>  


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users