1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     err_Exception.h
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 46347 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_ERR_CTR_ERR_EXCEPTION_H_
17 #define NN_ERR_CTR_ERR_EXCEPTION_H_
18 
19 #include <nn/os.h>
20 
21 namespace nn {
22 namespace err {
23 namespace CTR {
24 
25     void ThrowException( nn::os::ExceptionInfo* pei, nn::os::ExceptionContext* pec );
26     void ThrowResultFailureMessage( Result result, const char* message );
27 
28     void SetupExceptionHandler( void );
29     //void SetupResultHandler( void );      // Move to err_Api.h
30 
31     const char* GetExceptionTypeString(nn::os::ExceptionType type);
32     const char* GetAbortTypeString(bit32 fs);
33 
34 #ifndef NN_SWITCH_DISABLE_DEBUG_PRINT_FOR_SDK
35     void PrintGeneralRegisterInfo( const nn::os::ExceptionContext& ec );
36     void PrintAbortStatus( uptr fa, bit32 fs );
37     void PrintException(const nn::os::ExceptionInfo& ei, const nn::os::ExceptionContext& ec);
38 #endif
39 
40 }}} // nn::err::CTR
41 
42 #endif // NN_ERR_CTR_ERR_EXCEPTION_H_
43