Lines Matching refs:err
40 static void intl_free_custom_error_msg( intl_error* err ) in intl_free_custom_error_msg() argument
42 if( !err && !( err = intl_g_error_get( ) ) ) in intl_free_custom_error_msg()
45 if(err->free_custom_error_message ) { in intl_free_custom_error_msg()
46 efree( err->custom_error_message ); in intl_free_custom_error_msg()
49 err->custom_error_message = NULL; in intl_free_custom_error_msg()
50 err->free_custom_error_message = 0; in intl_free_custom_error_msg()
57 intl_error* err = ecalloc( 1, sizeof( intl_error ) ); in intl_error_create() local
59 intl_error_init( err ); in intl_error_create()
61 return err; in intl_error_create()
66 void intl_error_init( intl_error* err ) in intl_error_init() argument
68 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_init()
71 err->code = U_ZERO_ERROR; in intl_error_init()
72 err->custom_error_message = NULL; in intl_error_init()
73 err->free_custom_error_message = 0; in intl_error_init()
78 void intl_error_reset( intl_error* err ) in intl_error_reset() argument
80 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_reset()
83 err->code = U_ZERO_ERROR; in intl_error_reset()
85 intl_free_custom_error_msg( err ); in intl_error_reset()
90 void intl_error_set_custom_msg( intl_error* err, const char* msg, int copyMsg ) in intl_error_set_custom_msg() argument
95 if( !err ) { in intl_error_set_custom_msg()
101 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_set_custom_msg()
105 intl_free_custom_error_msg( err ); in intl_error_set_custom_msg()
108 err->free_custom_error_message = copyMsg; in intl_error_set_custom_msg()
111 err->custom_error_message = copyMsg ? estrdup( msg ) : (char *) msg; in intl_error_set_custom_msg()
116 zend_string * intl_error_get_message( intl_error* err ) in intl_error_get_message() argument
121 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_get_message()
124 uErrorName = u_errorName( err->code ); in intl_error_get_message()
127 if( err->custom_error_message ) in intl_error_get_message()
129 errMessage = strpprintf(0, "%s: %s", err->custom_error_message, uErrorName ); in intl_error_get_message()
141 void intl_error_set_code( intl_error* err, UErrorCode err_code ) in intl_error_set_code() argument
143 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_set_code()
146 err->code = err_code; in intl_error_set_code()
151 UErrorCode intl_error_get_code( intl_error* err ) in intl_error_get_code() argument
153 if( !err && !( err = intl_g_error_get( ) ) ) in intl_error_get_code()
156 return err->code; in intl_error_get_code()
161 void intl_error_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg ) in intl_error_set() argument
163 intl_error_set_code( err, code ); in intl_error_set()
164 intl_error_set_custom_msg( err, msg, copyMsg ); in intl_error_set()
169 void intl_errors_set( intl_error* err, UErrorCode code, const char* msg, int copyMsg ) in intl_errors_set() argument
171 intl_errors_set_code( err, code ); in intl_errors_set()
172 intl_errors_set_custom_msg( err, msg, copyMsg ); in intl_errors_set()
177 void intl_errors_reset( intl_error* err ) in intl_errors_reset() argument
179 if(err) { in intl_errors_reset()
180 intl_error_reset( err ); in intl_errors_reset()
187 void intl_errors_set_custom_msg( intl_error* err, const char* msg, int copyMsg ) in intl_errors_set_custom_msg() argument
189 if(err) { in intl_errors_set_custom_msg()
190 intl_error_set_custom_msg( err, msg, copyMsg ); in intl_errors_set_custom_msg()
197 void intl_errors_set_code( intl_error* err, UErrorCode err_code ) in intl_errors_set_code() argument
199 if(err) { in intl_errors_set_code()
200 intl_error_set_code( err, err_code ); in intl_errors_set_code()