1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 // -*- c++ -*- 19 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 20 21 // O S C L _ E R R O R _ I M P _ F A T A L E R R O R 22 23 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 24 25 /*! \addtogroup osclerror OSCL Error 26 * 27 * @{ 28 */ 29 30 31 /** \file oscl_error_imp_fatalerror.h 32 \brief Implementation File for Leave using system fatal error. 33 */ 34 35 #ifndef OSCL_ERROR_IMP_FATALERROR_H_INCLUDED 36 #define OSCL_ERROR_IMP_FATALERROR_H_INCLUDED 37 38 // Implementation File for Leave using system fatal error. 39 40 //Fatal error implementation for compilers without C++ exceptions. 41 //This implementation is very limited. Leave conditions 42 //just cause fatal program errors. There is no way to catch or trap 43 //any Leave. 44 #ifndef OSCL_ASSERT_H_INCLUDED 45 #include "oscl_assert.h" 46 #endif 47 48 //Leave just calls a system fatal error. 49 #define PVError_DoLeave() _OSCL_Abort() 50 51 //_PV_TRAP 52 //_r is leave code, _s is statements. 53 //this macro isn't really functional since any 54 //leave will abort the program, but it's needed 55 //to compile. 56 #define _PV_TRAP(__r,__s) \ 57 __r=OsclErrNone;\ 58 {__s;} 59 60 //_PV_TRAP_NO_TLS 61 //_r is leave code, _s is statements. 62 //this macro isn't really functional since any 63 //leave will abort the program, but it's needed 64 //to compile. 65 #define _PV_TRAP_NO_TLS(__tr,__r,__s) \ 66 __r=OsclErrNone;\ 67 {__s;} 68 69 70 71 #endif // OSCL_ERROR_IMP_FATALERROR_H_INCLUDED 72 73 /*! @} */ 74