Skip to content

Commit 76429bd

Browse files
committed
delta common: use VHD_ERRORCODE_ToPrettyString
Use the fn from ToPrettyString family also in delta_get_error_description() and hard-codec list as a fallbac.
1 parent 24fae3e commit 76429bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/deltacast_common.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
const char *
5757
delta_get_error_description(ULONG CodeError)
5858
{
59+
#ifdef HAVE_VHD_STRING
60+
return VHD_ERRORCODE_ToPrettyString((VHD_ERRORCODE) CodeError);
61+
#else // compat VHD < 6.30
5962
switch (CodeError) {
6063
case VHDERR_NOERROR:
6164
return "No error";
@@ -164,6 +167,7 @@ delta_get_error_description(ULONG CodeError)
164167
default:
165168
return "Unknown code error";
166169
}
170+
#endif
167171
}
168172

169173
auto

0 commit comments

Comments
 (0)