// srpexns.tbl -- exception table for srpersist

static int exnNameCount;

Scheme_Object **withInfoFuns;
Scheme_Object **noDataFuns;
Scheme_Object **invalidHandleFuns;
Scheme_Object **errorFuns;
Scheme_Object **needDataFuns;
Scheme_Object **stillExecutingFuns;
Scheme_Object **notImplementedFuns;

char *withInfoFields[] = { 
  "val",
};

char *needDataFields[] = { 
  "val",
};

/* !!! These macros depend on order of definitions in srp_exns !!! */

#define SRP_EXN_TYPE(n) ((*(srp_exns[n].pStructFuns))[0])

#define WITH_INFO_EXN_TYPE       SRP_EXN_TYPE(0)
#define NEED_DATA_EXN_TYPE       SRP_EXN_TYPE(1)
#define NO_DATA_EXN_TYPE         SRP_EXN_TYPE(2)
#define INVALID_HANDLE_EXN_TYPE  SRP_EXN_TYPE(3)
#define ERROR_EXN_TYPE           SRP_EXN_TYPE(4)
#define STILL_EXECUTING_EXN_TYPE SRP_EXN_TYPE(5)
#define NOT_IMPLEMENTED_EXN_TYPE SRP_EXN_TYPE(6)

SRPSTRUCT srp_exns[] = {
  { "exn-with-info",&withInfoFuns,withInfoFields,sizeray(withInfoFields) },
  { "exn-need-data",&needDataFuns,needDataFields,sizeray(needDataFields) },
  { "exn-no-data",&noDataFuns,NULL,0 },
  { "exn-invalid-handle",&invalidHandleFuns,NULL,0 },
  { "exn-error",&errorFuns,NULL,0 },
  { "exn-still-executing",&stillExecutingFuns,NULL,0 },
  { "exn-not-implemented",&notImplementedFuns,NULL,0 },
};

