mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-7121 add ErrorCode::errorName() convenience method
X-SVN-Rev: 26856
This commit is contained in:
parent
af6765a0a1
commit
4a6d872c21
2 changed files with 11 additions and 0 deletions
|
@ -31,4 +31,8 @@ void ErrorCode::assertSuccess() const {
|
|||
}
|
||||
}
|
||||
|
||||
const char* ErrorCode::errorName() const {
|
||||
return u_errorName(errorCode);
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
|
|
@ -109,6 +109,13 @@ public:
|
|||
* @draft ICU 4.4
|
||||
*/
|
||||
void assertSuccess() const;
|
||||
/**
|
||||
* Return a string for the UErrorCode value.
|
||||
* The string will be the same as the name of the error code constant
|
||||
* in the UErrorCode enum.
|
||||
* @draft ICU 4.4
|
||||
*/
|
||||
const char* errorName() const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue