Lines Matching refs:err
46 static void intl_free_custom_error_msg( intl_error* err ) in intl_free_custom_error_msg() argument
48 if( !err && !( err = intl_g_error_get( ) ) ) in intl_free_custom_error_msg()
51 if(err->free_custom_error_message ) { in intl_free_custom_error_msg()
52 efree( err->custom_error_message ); in intl_free_custom_error_msg()
55 err->custom_error_message = NULL; in intl_free_custom_error_msg()
56 err->free_custom_error_message = 0; in intl_free_custom_error_msg()
65 intl_error* err = ecalloc( 1, sizeof( intl_error ) ); in intl_error_create() local
67 intl_error_init( err ); in intl_error_create()
69 return err; in intl_error_create()
76 void intl_error_init( intl_error* err ) in intl_error_init() argument
78 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_init()
81 err->code = U_ZERO_ERROR; in intl_error_init()
82 err->custom_error_message = NULL; in intl_error_init()
83 err->free_custom_error_message = 0; in intl_error_init()
90 void intl_error_reset( intl_error* err ) in intl_error_reset() argument
92 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_reset()
95 err->code = U_ZERO_ERROR; in intl_error_reset()
97 intl_free_custom_error_msg( err ); in intl_error_reset()
104 void intl_error_set_custom_msg( intl_error* err, const char* msg, int copyMsg ) in intl_error_set_custom_msg() argument
109 if( !err ) { in intl_error_set_custom_msg()
115 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_set_custom_msg()
119 intl_free_custom_error_msg( err ); in intl_error_set_custom_msg()
122 err->free_custom_error_message = copyMsg; in intl_error_set_custom_msg()
125 err->custom_error_message = copyMsg ? estrdup( msg ) : (char *) msg; in intl_error_set_custom_msg()
132 zend_string * intl_error_get_message( intl_error* err ) in intl_error_get_message() argument
137 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_get_message()
140 uErrorName = u_errorName( err->code ); in intl_error_get_message()
143 if( err->custom_error_message ) in intl_error_get_message()
145 errMessage = strpprintf(0, "%s: %s", err->custom_error_message, uErrorName ); in intl_error_get_message()
159 void intl_error_set_code( intl_error* err, UErrorCode err_code ) in intl_error_set_code() argument
161 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_set_code()
164 err->code = err_code; in intl_error_set_code()
171 UErrorCode intl_error_get_code( intl_error* err ) in intl_error_get_code() argument
173 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_get_code()
176 return err->code; in intl_error_get_code()
183 void intl_error_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg ) in intl_error_set() argument
185 intl_error_set_code( err, code ); in intl_error_set()
186 intl_error_set_custom_msg( err, msg, copyMsg ); in intl_error_set()
193 void intl_errors_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg ) in intl_errors_set() argument
195 intl_errors_set_code( err, code ); in intl_errors_set()
196 intl_errors_set_custom_msg( err, msg, copyMsg ); in intl_errors_set()
202 void intl_errors_reset( intl_error* err ) in intl_errors_reset() argument
204 if(err) { in intl_errors_reset()
205 intl_error_reset( err ); in intl_errors_reset()
213 void intl_errors_set_custom_msg( intl_error* err, const char* msg, int copyMsg ) in intl_errors_set_custom_msg() argument
215 if(err) { in intl_errors_set_custom_msg()
216 intl_error_set_custom_msg( err, msg, copyMsg ); in intl_errors_set_custom_msg()
224 void intl_errors_set_code( intl_error* err, UErrorCode err_code ) in intl_errors_set_code() argument
226 if(err) { in intl_errors_set_code()
227 intl_error_set_code( err, err_code ); in intl_errors_set_code()