[petsc-users] Correct usage of CHKERRXX

Cedric Doucet cedric.doucet at inria.fr
Fri Aug 8 06:59:29 CDT 2014


Hello, 

I need to call several functions from Petsc in a C++ code. 
I would like to handle manage errors from Petsc with exceptions. 

In Petsc's documentation, I found that there exists a macro to do that : CHKERRXX. 

How does it work? 
Which kind of exception does it throw in case of failure? 
Do you inherit from std::exception? 
Is there an exception for each error code? 

Best, 

Cédric 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140808/0ceb400e/attachment.html>


More information about the petsc-users mailing list