Lines Matching refs:err
46 static void intl_free_custom_error_msg( intl_error* err TSRMLS_DC ) in intl_free_custom_error_msg()
48 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) 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 TSRMLS_CC ); in intl_error_create()
69 return err; in intl_error_create()
76 void intl_error_init( intl_error* err TSRMLS_DC ) in intl_error_init()
78 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) 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 TSRMLS_DC ) in intl_error_reset()
92 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_reset()
95 err->code = U_ZERO_ERROR; in intl_error_reset()
97 intl_free_custom_error_msg( err TSRMLS_CC ); in intl_error_reset()
104 void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_DC ) in intl_error_set_custom_msg() argument
109 if( !err ) { in intl_error_set_custom_msg()
115 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_set_custom_msg()
119 intl_free_custom_error_msg( err TSRMLS_CC ); 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 ) : msg; in intl_error_set_custom_msg()
132 char* intl_error_get_message( intl_error* err TSRMLS_DC ) in intl_error_get_message()
137 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) 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 spprintf( &errMessage, 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 TSRMLS_DC ) in intl_error_set_code() argument
161 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_set_code()
164 err->code = err_code; in intl_error_set_code()
171 UErrorCode intl_error_get_code( intl_error* err TSRMLS_DC ) in intl_error_get_code()
173 if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) in intl_error_get_code()
176 return err->code; in intl_error_get_code()
183 void intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC ) in intl_error_set() argument
185 intl_error_set_code( err, code TSRMLS_CC ); in intl_error_set()
186 intl_error_set_custom_msg( err, msg, copyMsg TSRMLS_CC ); in intl_error_set()
193 void intl_errors_set( intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC ) in intl_errors_set() argument
195 intl_errors_set_code( err, code TSRMLS_CC ); in intl_errors_set()
196 intl_errors_set_custom_msg( err, msg, copyMsg TSRMLS_CC ); in intl_errors_set()
202 void intl_errors_reset( intl_error* err TSRMLS_DC ) in intl_errors_reset()
204 if(err) { in intl_errors_reset()
205 intl_error_reset( err TSRMLS_CC ); in intl_errors_reset()
213 void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_DC ) 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 TSRMLS_CC ); in intl_errors_set_custom_msg()
224 void intl_errors_set_code( intl_error* err, UErrorCode err_code TSRMLS_DC ) in intl_errors_set_code() argument
226 if(err) { in intl_errors_set_code()
227 intl_error_set_code( err, err_code TSRMLS_CC ); in intl_errors_set_code()