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
00027 #include <axis2_defines.h>
00028 #include <axis2_env.h>
00029
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034
00035
00036 #define FUNCTION_NAME __FUNCTION__
00037 #define LINE_NUMBER __LINE__
00038 #define FILE_NAME __FILE__
00039
00040 #define ERROR_LOCATION FILE_NAME,LINE_NUMBER,FUNCTION_NAME
00041
00042
00043 #define OXS_ERROR_DEFAULT 0
00044 #define OXS_ERROR_ENCRYPT_FAILED 1
00045 #define OXS_ERROR_DECRYPT_FAILED 2
00046 #define OXS_ERROR_INVALID_DATA 3
00047 #define OXS_ERROR_INVALID_SIZE 4
00048 #define OXS_ERROR_INVALID_FORMAT 5
00049 #define OXS_ERROR_ELEMENT_FAILED 6
00050 #define OXS_ERROR_UNSUPPORTED_ALGO 7
00051 #define OXS_ERROR_CREATION_FAILED 8
00052 #define OXS_ERROR_INITIALIZATION_FAILED 9
00053 #define OXS_ERROR_DATA_CONV_FAILED 10
00054 #define OXS_ERROR_OPENSSL_FUNC_FAILED 11
00055
00056
00057 typedef struct _oxs_error_description oxs_error_description, *oxs_error_description_ptr;
00058
00064 struct _oxs_error_description
00065 {
00066 int code;
00067 const char* message;
00068 };
00069
00075 AXIS2_EXTERN const char* AXIS2_CALL
00076 oxs_errors_get_msg_by_code(int code);
00077
00083 AXIS2_EXTERN const char* AXIS2_CALL
00084 oxs_errors_get_msg(unsigned int pos);
00085
00091 AXIS2_EXTERN int AXIS2_CALL
00092 oxs_errors_get_code(unsigned int pos);
00093
00103 AXIS2_EXTERN void AXIS2_CALL
00104 oxs_error(const char* file, int line, const char* func,
00105 int code, const char* msg,...);
00106
00108 #ifdef __cplusplus
00109 }
00110 #endif
00111
00112 #endif