19#ifndef __ERRORCODE_H__
20#define __ERRORCODE_H__
30#if U_SHOW_CPLUSPLUS_API
Wrapper class for UErrorCode, with conversion operators for direct use in ICU C and C++ APIs.
UBool isFailure() const
Tests for U_FAILURE().
virtual ~ErrorCode()
Destructor, does nothing.
virtual void handleFailure() const
Called by assertSuccess() if isFailure() is true.
void assertSuccess() const
Asserts isSuccess().
UErrorCode errorCode
Internal UErrorCode, accessible to subclasses.
UBool isSuccess() const
Tests for U_SUCCESS().
void set(UErrorCode value)
Sets the UErrorCode value.
UErrorCode reset()
Returns the UErrorCode value and resets it to U_ZERO_ERROR.
UErrorCode get() const
Returns the UErrorCode value.
ErrorCode()
Default constructor.
const char * errorName() const
Return a string for the UErrorCode value.
UMemory is the common ICU base class.
int8_t UBool
The ICU boolean type, a signed-byte integer.
C++ API: Common ICU base class UObject.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
@ U_ZERO_ERROR
No error, no warning.
#define U_FAILURE(x)
Does the error code indicate a failure?
#define U_SUCCESS(x)
Does the error code indicate success?
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.