Boost Python error handling