00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef OXS_ERROR_H
00019 #define OXS_ERROR_H
00020
00021
00031 #include <axis2_defines.h>
00032 #include <axutil_env.h>
00033
00034 #ifdef __cplusplus
00035 extern "C"
00036 {
00037 #endif
00038
00039 #if defined( WIN32 ) && (_MSC_VER < 1300)
00040 #define __FUNCTION__ NULL
00041 #endif
00042
00043
00044 #define FUNCTION_NAME __FUNCTION__
00045 #define LINE_NUMBER __LINE__
00046 #define FILE_NAME __FILE__
00047
00048 #define ERROR_LOCATION FILE_NAME,LINE_NUMBER,FUNCTION_NAME
00049
00050
00051 #define OXS_ERROR_DEFAULT 0
00052 #define OXS_ERROR_ENCRYPT_FAILED 1
00053 #define OXS_ERROR_DECRYPT_FAILED 2
00054 #define OXS_ERROR_INVALID_DATA 3
00055 #define OXS_ERROR_INVALID_SIZE 4
00056 #define OXS_ERROR_INVALID_FORMAT 5
00057 #define OXS_ERROR_ELEMENT_FAILED 6
00058 #define OXS_ERROR_UNSUPPORTED_ALGO 7
00059 #define OXS_ERROR_CREATION_FAILED 8
00060 #define OXS_ERROR_INITIALIZATION_FAILED 9
00061 #define OXS_ERROR_DATA_CONV_FAILED 10
00062 #define OXS_ERROR_OPENSSL_FUNC_FAILED 11
00063 #define OXS_ERROR_TRANSFORM_FAILED 12
00064 #define OXS_ERROR_SIGN_FAILED 13
00065 #define OXS_ERROR_SIG_VERIFICATION_FAILED 14
00066
00067 typedef struct _oxs_error_description oxs_error_description, *oxs_error_description_ptr;
00068
00074 struct _oxs_error_description
00075 {
00076 int code;
00077 const char* message;
00078 };
00079
00085 AXIS2_EXTERN const char* AXIS2_CALL
00086 oxs_errors_get_msg_by_code(int code);
00087
00093 AXIS2_EXTERN const char* AXIS2_CALL
00094 oxs_errors_get_msg(unsigned int pos);
00095
00101 AXIS2_EXTERN int AXIS2_CALL
00102 oxs_errors_get_code(unsigned int pos);
00103
00113 AXIS2_EXTERN void AXIS2_CALL
00114 oxs_error(const axutil_env_t *env, const char* file, int line, const char* func,
00115 int code, const char* msg,...);
00116
00118 #ifdef __cplusplus
00119 }
00120 #endif
00121
00122 #endif