Path: blob/master/thirdparty/icu4c/common/errorcode.cpp
9903 views
// © 2016 and later: Unicode, Inc. and others.1// License & terms of use: http://www.unicode.org/copyright.html2/*3*******************************************************************************4*5* Copyright (C) 2009-2011, International Business Machines6* Corporation and others. All Rights Reserved.7*8*******************************************************************************9* file name: errorcode.cpp10* encoding: UTF-811* tab size: 8 (not used)12* indentation:413*14* created on: 2009mar1015* created by: Markus W. Scherer16*/1718#include "unicode/utypes.h"19#include "unicode/errorcode.h"2021U_NAMESPACE_BEGIN2223ErrorCode::~ErrorCode() {}2425UErrorCode ErrorCode::reset() {26UErrorCode code = errorCode;27errorCode = U_ZERO_ERROR;28return code;29}3031void ErrorCode::assertSuccess() const {32if(isFailure()) {33handleFailure();34}35}3637const char* ErrorCode::errorName() const {38return u_errorName(errorCode);39}4041U_NAMESPACE_END424344