SWIG and Automated C/C++ Scripting Extensions
By David Beazley
Dr. Dobb's Journal February 1998
%except(perl5) { try { $function // This gets filled in by the real function call } catch (RangeError) { croak("Range Error"); } catch (MemoryError) { croak("Out of memory"); } catch (...) { croak("Unknown exception!"); } }
Example 11: Specifying and exception handler.
Copyright © 1998, Dr. Dobb's Journal