Calling C++ code from Ruby Can't let the C++ exception leave C++ code Wrap all C++ functions with try/catch blocks Use Swig's %except directive