/branches/gsoc2009-sploving/Lib/r/exception.i

# · Swig · 8 lines · 5 code · 3 blank · 0 comment · 0 complexity · 345fde5ffbcabf36830f05897fe653f2 MD5 · raw file

  1. %include <typemaps/exception.swg>
  2. %insert("runtime") {
  3. %define_as(SWIG_exception(code, msg),
  4. %block(switch (code) {case SWIG_IndexError: return Rf_ScalarLogical(NA_LOGICAL); default: %error(code, msg); SWIG_fail;} ))
  5. }