// --------------------------------------------------------------------------- // CMMCScBkupState::RunError() // // // --------------------------------------------------------------------------- TInt CMMCScBkupState::RunError(TInt aError) { #ifdef MMCSCBKUP_USE_BREAKPOINTS __BREAKPOINT(); #endif // if ( aError == KErrNoMemory || aError == KErrDiskFull || aError == KErrNotReady || aError == KErrServerTerminated || aError == KErrWrite ) { __LOGFILE2("CMMCScBkupState::RunError() - **** - FATAL ERROR - state: 0x%08x, aError: %d - Notifying Observer (Engine)", StateId().iUid, aError ); CompleteObserver( aError ); } else { __LOGFILE2("CMMCScBkupState::RunError() - **** - ATTEMPT TO HANDLE ERROR - state: 0x%08x, aError: %d...", StateId().iUid, aError ); const TBool errorHandled = PerformAsynchronousErrorCleanup( aError ); __LOGFILE1("CMMCScBkupState::RunError() - **** - handle error result: %d", errorHandled ); // If the cleanup callback didn't set us active again, then // assume the object didn't perform any recovery. Therefore // inform our observer about the error and give up. if (!errorHandled || !IsActive()) { CompleteObserver( aError ); } } // return KErrNone; }
/* * ターゲットシステムの異常終了 */ void kernel_abort(void) { /* * プログラムの停止 */ while( 1 ) { __BREAKPOINT() ; } }
/* * ターゲットシステムの終了 */ void sys_exit(void) { /* * プログラムの停止 */ while( 1 ) { __BREAKPOINT() ; } }
// ASSERT void SdkCardAssert(const TText* s, const TText* f, TInt l) { TRACE1("Assertion failed: %s",s); TRACE1("File: %s",f); TRACE1("Line: %d",l); if (IsDebuggerPresent()) { __BREAKPOINT(); } }
// LEAVE void SdkCardLeave(TInt err, const TText* s, const TText* f, TInt l) { TRACE2("Leaving with error %d (%s)",err,s); TRACE1("File: %s",f); TRACE1("Line: %d",l); if (IsDebuggerPresent()) { __BREAKPOINT(); } User::Leave(err); }
void EcmtSdkLeaveIfError(TInt err,const TText* s,const TText* file,TInt line) { if (err != KErrNone) { TRACE2("Error %d in %s",err,s); TRACE1("File: %s",file); TRACE1("Line: %d",line); if (IsDebuggerPresent()) { __BREAKPOINT(); } User::Leave(err); } }
void EcmtSdkAssert(const TText* s,const TText* file,TInt /*line*/) { // TRACE macro panics outside of a Symbian thread context OutputDebugStringA(TRACE_PREFIX "Assertion failed: "); OutputDebugString(s); OutputDebugStringA("\nFile: "); OutputDebugString(file); OutputDebugStringA("\n"); //TRACE1("Line: %d",line); if (IsDebuggerPresent()) { __BREAKPOINT(); } }
// LEAVE_IF_NULL void SdkCardLeaveIfNull(void* ptr,const TText* s,const TText* f,TInt l) { if (ptr != KErrNone) { TRACE1("Expression is NULL: %s",s); TRACE1("File: %s",f); TRACE1("Line: %d",l); if (IsDebuggerPresent()) { __BREAKPOINT(); } User::Leave(KErrNoMemory); } }
// LEAVE_IF_ERROR void SdkCardLeaveIfError(TInt err, const TText* s, const TText* f, TInt l) { if (err != KErrNone) { TRACE1("Unexpected error: %d",err); TRACE1("Expression: %s",s); TRACE1("File: %s",f); TRACE1("Line: %d",l); if (IsDebuggerPresent()) { __BREAKPOINT(); } User::Leave(err); } }
// ASSERT_SUCCESS TInt SdkCardAssertSuccess(TInt err, const TText* s, const TText* f, TInt l) { if (err != KErrNone) { TRACE1("Unexpected error: %d",err); TRACE1("Expression: %s",s); TRACE1("File: %s",f); TRACE1("Line: %d",l); if (IsDebuggerPresent()) { __BREAKPOINT(); } } return err; }
void Panic(const TInt aCode) { _LIT(KPanicText,"GFXTRANS"); __BREAKPOINT(); User::Panic(KPanicText,aCode); }