Line data Source code
1 : // © 2016 and later: Unicode, Inc. and others.
2 : // License & terms of use: http://www.unicode.org/copyright.html
3 : /*
4 : *******************************************************************************
5 : *
6 : * Copyright (C) 2009-2011, International Business Machines
7 : * Corporation and others. All Rights Reserved.
8 : *
9 : *******************************************************************************
10 : * file name: errorcode.cpp
11 : * encoding: UTF-8
12 : * tab size: 8 (not used)
13 : * indentation:4
14 : *
15 : * created on: 2009mar10
16 : * created by: Markus W. Scherer
17 : */
18 :
19 : #include "unicode/utypes.h"
20 : #include "unicode/errorcode.h"
21 :
22 : U_NAMESPACE_BEGIN
23 :
24 0 : ErrorCode::~ErrorCode() {}
25 :
26 0 : UErrorCode ErrorCode::reset() {
27 0 : UErrorCode code = errorCode;
28 0 : errorCode = U_ZERO_ERROR;
29 0 : return code;
30 : }
31 :
32 0 : void ErrorCode::assertSuccess() const {
33 0 : if(isFailure()) {
34 0 : handleFailure();
35 : }
36 0 : }
37 :
38 0 : const char* ErrorCode::errorName() const {
39 0 : return u_errorName(errorCode);
40 : }
41 :
42 : U_NAMESPACE_END
|