2009-03-11 05:27:11 +00:00
|
|
|
/*
|
|
|
|
*******************************************************************************
|
|
|
|
*
|
2011-07-26 05:32:25 +00:00
|
|
|
* Copyright (C) 2009-2011, International Business Machines
|
2009-03-11 05:27:11 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
*
|
|
|
|
*******************************************************************************
|
|
|
|
* file name: errorcode.cpp
|
|
|
|
* encoding: US-ASCII
|
|
|
|
* tab size: 8 (not used)
|
|
|
|
* indentation:4
|
|
|
|
*
|
|
|
|
* created on: 2009mar10
|
|
|
|
* created by: Markus W. Scherer
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#include "unicode/errorcode.h"
|
|
|
|
|
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
2011-07-26 05:32:25 +00:00
|
|
|
ErrorCode::~ErrorCode() {}
|
|
|
|
|
2009-03-11 05:27:11 +00:00
|
|
|
UErrorCode ErrorCode::reset() {
|
|
|
|
UErrorCode code = errorCode;
|
|
|
|
errorCode = U_ZERO_ERROR;
|
|
|
|
return code;
|
|
|
|
}
|
|
|
|
|
2009-05-27 22:31:13 +00:00
|
|
|
void ErrorCode::assertSuccess() const {
|
2009-03-11 17:57:24 +00:00
|
|
|
if(isFailure()) {
|
|
|
|
handleFailure();
|
|
|
|
}
|
2009-03-11 05:27:11 +00:00
|
|
|
}
|
|
|
|
|
2009-11-09 15:40:57 +00:00
|
|
|
const char* ErrorCode::errorName() const {
|
|
|
|
return u_errorName(errorCode);
|
|
|
|
}
|
|
|
|
|
2009-03-11 05:27:11 +00:00
|
|
|
U_NAMESPACE_END
|