#ifndef _MODULE_Exception_
#define _MODULE_Exception_

#include <__typemap.h>
#include <RT0.oh>
#include <RT0.oh>
#include <Object.oh>
#include <RT0.oh>
#include <Object.oh>
typedef struct Exception__ExceptionDesc *Exception__Exception;
typedef struct Exception__ExceptionDesc {
  Object__String msg;
  OOC_PTR backtrace[21];
  OOC_INT32 backtraceSize;
} Exception__ExceptionDesc;
typedef struct Exception__Context *Exception__ContextPtr;
typedef struct Exception__Context {
  Exception__ContextPtr next;
  OOC_PTR jmpbuf;
} Exception__Context;
typedef struct Exception__ParseErrorDesc *Exception__ParseError;
typedef struct Exception__ParseErrorDesc {
  Object__String msg;
  OOC_PTR backtrace[21];
  OOC_INT32 backtraceSize;
  OOC_INT32 offset;
} Exception__ParseErrorDesc;
typedef struct Exception__ThreadState *Exception__ThreadStatePtr;
typedef struct Exception__ThreadState {
  Exception__ContextPtr contextStack;
  Exception__Exception currentException;
} Exception__ThreadState;
extern Exception__ThreadStatePtr (*Exception__GetThreadState)(void);
extern void Exception__ExceptionDesc_INIT(Exception__Exception e, Object__String msg);
#define _TBN_Exception__ExceptionDesc_INIT 1
typedef void (*_TBP_Exception__ExceptionDesc_INIT)(Exception__Exception e, Object__String msg);
extern void NORETURN Exception__Raise(Exception__Exception e) NORETURN2;
extern Exception__Exception Exception__Current(void);
extern void Exception__Clear(void);
extern void Exception__ClearFixed(struct Exception__Context *context);
extern void Exception__PushContext(struct Exception__Context *context, OOC_PTR jmpbuf);
extern void Exception__PopContext(OOC_INT32 n);
extern void NORETURN Exception__ActivateContext(void) NORETURN2;
extern Object__String Exception__ExceptionDesc_GetMessage(Exception__Exception e);
#define _TBN_Exception__ExceptionDesc_GetMessage 0
typedef Object__String (*_TBP_Exception__ExceptionDesc_GetMessage)(Exception__Exception e);
extern void Exception__ExceptionDesc_WriteBacktrace(Exception__Exception e);
#define _TBN_Exception__ExceptionDesc_WriteBacktrace 3
typedef void (*_TBP_Exception__ExceptionDesc_WriteBacktrace)(Exception__Exception e);
extern Object__String8 Exception__ExceptionDesc_Name(Exception__Exception e);
#define _TBN_Exception__ExceptionDesc_Name 2
typedef Object__String8 (*_TBP_Exception__ExceptionDesc_Name)(Exception__Exception e);
extern void Exception__ParseErrorDesc_INIT(Exception__ParseError e, Object__String msg, OOC_INT32 offset);
#define _TBN_Exception__ParseErrorDesc_INIT 1
typedef void (*_TBP_Exception__ParseErrorDesc_INIT)(Exception__ParseError e, Object__String msg, OOC_INT32 offset);
extern void NORETURN Exception__Abort(Exception__Exception e) NORETURN2;
extern void NORETURN Exception__FatalError(Object__String msg) NORETURN2;
extern void Exception__InitThreadState(struct Exception__ThreadState *ts);
extern void OOC_Exception_init(void);
extern void OOC_Exception_init0(void);

/* run-time meta data */
extern RT0__StructDesc _td_Exception__Exception;
extern RT0__StructDesc _td_Exception__ExceptionDesc;
extern RT0__StructDesc _td_Exception__4189;
extern RT0__StructDesc _td_Exception__ContextPtr;
extern RT0__StructDesc _td_Exception__ParseError;
extern RT0__StructDesc _td_Exception__ParseErrorDesc;
extern RT0__StructDesc _td_Exception__ThreadStatePtr;
#endif /* _MODULE_Exception_ */

/* --- */
