usbengines/usbwatcher/inc/debug.h
branchRCL_3
changeset 64 8ecef05bbada
parent 0 1e05558e2206
child 19 3346ae8c7c53
child 39 82988ef59a49
equal deleted inserted replaced
8:7e15987c4500 64:8ecef05bbada
   135 private:
   135 private:
   136     TPtrC8 iFuncName;
   136     TPtrC8 iFuncName;
   137     };
   137     };
   138 #endif // LOG_TO_FILE
   138 #endif // LOG_TO_FILE
   139 
   139 
   140 #define LEAVE( exp )  {volatile TInt err = exp; \
   140 #define LEAVE( exp )  {volatile TInt err_ = exp; \
   141             LOG3( "LEAVE(%d) @file: %s, line: %d", err, __FILE__, __LINE__ );\
   141         LOG3( "LEAVE(%d) @file: %s, line: %d", err_, __FILE__, __LINE__ );\
   142             User::Leave( err );}
   142         User::Leave( err_ );}
   143 
   143 
   144 #define LEAVEIFERROR( exp ) {volatile TInt err = exp; if(err < 0) LEAVE(err);}
   144 #define LEAVEIFERROR( exp ) {volatile TInt err__ = exp; \
       
   145 		if(err__ < 0) LEAVE(err__);}
   145 
   146 
   146 #define PANIC( exp ) {volatile TInt err = exp; \
   147 #define PANIC( exp ) {volatile TInt err_ = exp; \
   147             LOG3( "PANIC(%d) @file: %s, line: %d", err, __FILE__, __LINE__ );\
   148         LOG3( "PANIC(%d) @file: %s, line: %d", err_, __FILE__, __LINE__ );\
   148             User::Panic( KUsbPanicModule, err );}
   149         User::Panic( KUsbPanicModule, err_ );}
   149 
   150 
   150 
   151 
   151 #define LOG_FUNC TFuncLogger __instrument(TPtrC8((TUint8*)__PRETTY_FUNCTION__));
   152 #define LOG_FUNC TFuncLogger __instrument(TPtrC8((TUint8*)__PRETTY_FUNCTION__));
   152 
   153 
   153 #else // _DEBUG   
   154 #else // _DEBUG