summaryrefslogtreecommitdiff
path: root/src/corefx/System.Globalization.Native/errors.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corefx/System.Globalization.Native/errors.h')
-rw-r--r--src/corefx/System.Globalization.Native/errors.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corefx/System.Globalization.Native/errors.h b/src/corefx/System.Globalization.Native/errors.h
index 2bfbdb2ba1..b23a0dacd5 100644
--- a/src/corefx/System.Globalization.Native/errors.h
+++ b/src/corefx/System.Globalization.Native/errors.h
@@ -4,8 +4,6 @@
#pragma once
-#include <unicode/utypes.h>
-
/*
* These values should be kept in sync with
* Interop.GlobalizationInterop.ResultCode
@@ -15,6 +13,7 @@ enum ResultCode : int32_t
Success = 0,
UnknownError = 1,
InsufficentBuffer = 2,
+ OutOfMemory = 3
};
/*
@@ -26,6 +25,11 @@ static ResultCode GetResultCode(UErrorCode err)
{
return InsufficentBuffer;
}
+
+ if (err == U_MEMORY_ALLOCATION_ERROR)
+ {
+ return OutOfMemory;
+ }
if (U_SUCCESS(err))
{