#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef __Asura_ExceptionHandler_h__
#define __Asura_ExceptionHandler_h__

// Define this to 1 in your Asura_EngineConfiguration.h if desired. Bear in
// mind that you'll then need to link with libexcep.a, which is pretty large.
#ifdef ASURA_PS2_USE_EXCEPTION_HANDLER

    #include <eetypes.h>

#if !defined( ASURA_PS2_EE_ONLY_EH )
    #define ASURA_PS2_EE_ONLY_EH (0)
#endif // #if !defined( ASURA_PS2_EE_ONLY_EH )

    #if ASURA_PS2_EE_ONLY_EH

        void Asura_ExceptionHandler(u_int stat, u_int cause, u_int epc, u_int bva, u_int bpa, u_long128 *gpr);

    #else

        #include <libexcep.h>

        void IOPExceptionHandler(void *p,void *d);
        void EEExceptionHandler(u_int stat, u_int cause, u_int epc, u_int bva, u_int bpa, u_long128 *gpr);

        extern sceExcepIOPExceptionData iop;

    #endif

#endif // #ifdef ASURA_PS2_USE_EXCEPTION_HANDLER
  
#endif //__Asura_ExceptionHandler_h__
