michael@0: /* michael@0: ******************************************************************************* michael@0: * michael@0: * Copyright (C) 2009-2011, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: * michael@0: ******************************************************************************* michael@0: * file name: errorcode.cpp michael@0: * encoding: US-ASCII michael@0: * tab size: 8 (not used) michael@0: * indentation:4 michael@0: * michael@0: * created on: 2009mar10 michael@0: * created by: Markus W. Scherer michael@0: */ michael@0: michael@0: #include "unicode/utypes.h" michael@0: #include "unicode/errorcode.h" michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: ErrorCode::~ErrorCode() {} michael@0: michael@0: UErrorCode ErrorCode::reset() { michael@0: UErrorCode code = errorCode; michael@0: errorCode = U_ZERO_ERROR; michael@0: return code; michael@0: } michael@0: michael@0: void ErrorCode::assertSuccess() const { michael@0: if(isFailure()) { michael@0: handleFailure(); michael@0: } michael@0: } michael@0: michael@0: const char* ErrorCode::errorName() const { michael@0: return u_errorName(errorCode); michael@0: } michael@0: michael@0: U_NAMESPACE_END