Lines Matching refs:err
42 static void intl_free_custom_error_msg( intl_error* err TSRMLS_DC ) in intl_free_custom_error_msg()
44 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_free_custom_error_msg()
47 if(err->free_custom_error_message ) { in intl_free_custom_error_msg()
48 efree( err->custom_error_message ); in intl_free_custom_error_msg()
51 err->custom_error_message = NULL; in intl_free_custom_error_msg()
52 err->free_custom_error_message = 0; in intl_free_custom_error_msg()
61 intl_error* err = ecalloc( 1, sizeof( intl_error ) ); in intl_error_create() local
63 intl_error_init( err TSRMLS_CC ); in intl_error_create()
65 return err; in intl_error_create()
72 void intl_error_init( intl_error* err TSRMLS_DC ) in intl_error_init()
74 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_init()
77 err->code = U_ZERO_ERROR; in intl_error_init()
78 err->custom_error_message = NULL; in intl_error_init()
79 err->free_custom_error_message = 0; in intl_error_init()
86 void intl_error_reset( intl_error* err TSRMLS_DC ) in intl_error_reset()
88 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_reset()
91 err->code = U_ZERO_ERROR; in intl_error_reset()
93 intl_free_custom_error_msg( err TSRMLS_CC ); in intl_error_reset()
100 void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_DC ) in intl_error_set_custom_msg() argument
105 if(!err && INTL_G(error_level)) { in intl_error_set_custom_msg()
108 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_set_custom_msg()
112 intl_free_custom_error_msg( err TSRMLS_CC ); in intl_error_set_custom_msg()
115 err->free_custom_error_message = copyMsg; in intl_error_set_custom_msg()
118 err->custom_error_message = copyMsg ? estrdup( msg ) : msg; in intl_error_set_custom_msg()
125 char* intl_error_get_message( intl_error* err TSRMLS_DC ) in intl_error_get_message()
130 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_get_message()
133 uErrorName = u_errorName( err->code ); in intl_error_get_message()
136 if( err->custom_error_message ) in intl_error_get_message()
138 spprintf( &errMessage, 0, "%s: %s", err->custom_error_message, uErrorName ); in intl_error_get_message()
152 void intl_error_set_code( intl_error* err, UErrorCode err_code TSRMLS_DC ) in intl_error_set_code() argument
154 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_set_code()
157 err->code = err_code; in intl_error_set_code()
164 UErrorCode intl_error_get_code( intl_error* err TSRMLS_DC ) in intl_error_get_code()
166 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_get_code()
169 return err->code; in intl_error_get_code()
176 void intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC ) in intl_error_set() argument
178 intl_error_set_code( err, code TSRMLS_CC ); in intl_error_set()
179 intl_error_set_custom_msg( err, msg, copyMsg TSRMLS_CC ); in intl_error_set()
186 void intl_errors_set( intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC ) in intl_errors_set() argument
188 intl_errors_set_code( err, code TSRMLS_CC ); in intl_errors_set()
189 intl_errors_set_custom_msg( err, msg, copyMsg TSRMLS_CC ); in intl_errors_set()
195 void intl_errors_reset( intl_error* err TSRMLS_DC ) in intl_errors_reset()
197 if(err) { in intl_errors_reset()
198 intl_error_reset( err TSRMLS_CC ); in intl_errors_reset()
206 void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_DC ) in intl_errors_set_custom_msg() argument
208 if(err) { in intl_errors_set_custom_msg()
209 intl_error_set_custom_msg( err, msg, copyMsg TSRMLS_CC ); in intl_errors_set_custom_msg()
217 void intl_errors_set_code( intl_error* err, UErrorCode err_code TSRMLS_DC ) in intl_errors_set_code() argument
219 if(err) { in intl_errors_set_code()
220 intl_error_set_code( err, err_code TSRMLS_CC ); in intl_errors_set_code()