X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inc%2FFBaseErrorDefine.h;h=e91643b7cc66d1ba51399e9e551fe930071a88df;hb=376b1791f5888970901326fa60f67431fa701a4d;hp=385ac82e2269c80cea9db0dcd2c74c3f0d2b74f5;hpb=27f1388665067f69d5eb64e0cae6bb5f4250beec;p=platform%2Fframework%2Fnative%2Fappfw.git diff --git a/inc/FBaseErrorDefine.h b/inc/FBaseErrorDefine.h index 385ac82..e91643b 100644 --- a/inc/FBaseErrorDefine.h +++ b/inc/FBaseErrorDefine.h @@ -16,37 +16,31 @@ /** * @file FBaseErrorDefine.h - * @brief This header file defines common error codes. + * @brief This header file defines the common error codes. * - * This header file contains the definitions of error codes. + * This header file contains the definitions of the common error codes. */ - #ifndef _FBASE_ERROR_DEFINE_H_ #define _FBASE_ERROR_DEFINE_H_ #include - #define E_SEVERITY_POS 31 #define E_TYPE_POS 29 -#define SET_E_SEVERITY(X) (static_cast(PUT_MASK(0, (X), E_SEVERITY_POS))) -#define SET_E_TYPE(X) (static_cast(PUT_MASK(0, (X), E_TYPE_POS))) -#define SET_E_CAUSE(X) (static_cast(X)) - +#define SET_E_SEVERITY(X) (static_cast< unsigned long >(PUT_MASK(0, (X), E_SEVERITY_POS))) +#define SET_E_TYPE(X) (static_cast< unsigned long >(PUT_MASK(0, (X), E_TYPE_POS))) +#define SET_E_CAUSE(X) (static_cast< unsigned long >(X)) // Error severities #define E_SUCCESS (SET_E_SEVERITY(0)) #define E_FAILURE (SET_E_SEVERITY(1)) - // Error types #define ERR_SRC_FRAMEWORK (E_FAILURE + SET_E_TYPE(1)) #define ERR_SRC_USER (E_FAILURE + SET_E_TYPE(2)) - // Macros for error codes -#define IsFailed(X) (static_cast(X) != E_SUCCESS) - +#define IsFailed(X) (static_cast< long >(X) != E_SUCCESS) -#endif //_FBASE_ERROR_DEFINE_H_ +#endif //_FBASE_ERROR_DEFINE_H_ \ No newline at end of file