Conditional Exception Handling

Posted by Lapin on
URL: http://quantlib.414.s1.nabble.com/Conditional-Exception-Handling-tp1452.html

Hi,

I would like to fill an array with teh engine results, but sometimes greeks are not filled.
In this case QL will throw an exception that I can catch without any issues.

My issue lies in the fact I don't think we can do conditional exception handling. By this I mean I would like to do:

if( barrierOption.delta() != ERROR )
   output[i]   = barrierOption.delta();

Does anybody knows how to do within QL framework?

Thanks