Change contentType XSD to be compatible with both MSXML6 and xerces.

Further improve logging to aid in debugging.
This commit is contained in:
Phil Smith 2018-03-13 12:00:49 -07:00
Родитель 7ced63f393
Коммит 3d9d2ac507
2 изменённых файлов: 19 добавлений и 15 удалений

Просмотреть файл

@ -48,7 +48,7 @@
<!--
<xs:pattern value="[media-type]"/>
-->
<xs:pattern value="(((([\p{IsBasicLatin}-[\p{Cc}&#127;\(\)&lt;&gt;@,;:\\&quot;/\[\]\?=\{\}\s\t]])+))/((([\p{IsBasicLatin}-[\p{Cc}&#127;\(\)&lt;&gt;@,;:\\&quot;/\[\]\?=\{\}\s\t]])+))((\s+)*;(\s+)*(((([\p{IsBasicLatin}-[\p{Cc}&#127;\(\)&lt;&gt;@,;:\\&quot;/\[\]\?=\{\}\s\t]])+))=((([\p{IsBasicLatin}-[\p{Cc}&#127;\(\)&lt;&gt;@,;:\\&quot;/\[\]\?=\{\}\s\t]])+)|(&quot;(([\p{IsLatin-1Supplement}\p{IsBasicLatin}-[\p{Cc}&#127;&quot;\n\r]]|(\s+))|(\\[\p{IsBasicLatin}]))*&quot;))))*)" />
<xs:pattern value="(([!$&amp;'\(\)\*\+,:=]|(%[0-9a-fA-F][0-9a-fA-F])|[:@]|[a-zA-Z0-9\-_~])+)/(([!$&amp;'\(\)\*\+,:=]|(%[0-9a-fA-F][0-9a-fA-F])|[:@]|\.|[a-zA-Z0-9\-_~])+)" />
</xs:restriction>
</xs:simpleType>

Просмотреть файл

@ -211,22 +211,26 @@ namespace MSIX {
}
// Helper to make code more terse and more readable at the same time.
#define ThrowErrorIfNot(c, a, m) \
{ \
if (!(a)) \
{ \
assert(false); \
throw MSIX::Exception(c,m); \
} \
#define ThrowErrorIfNot(c, a, m) \
{ \
if (!(a)) \
{ assert(false); \
std::ostringstream _message; \
_message << "Call failed in: " << __FILE__ << " on line " << __LINE__ << "\n" << m; \
std::string reason = _message.str(); \
throw MSIX::Exception(c, reason.c_str()); \
} \
}
#define ThrowWin32ErrorIfNot(c, a, m) \
{ \
if (!(a)) \
{ \
assert(false); \
throw MSIX::Win32Exception(c,m); \
} \
#define ThrowWin32ErrorIfNot(c, a, m) \
{ \
if (!(a)) \
{ assert(false); \
std::ostringstream _message; \
_message << "Call failed in: " << __FILE__ << " on line " << __LINE__ << "\n" << m; \
std::string reason = _message.str(); \
throw MSIX::Win32Exception(c,reason.c_str()); \
} \
}
#define ThrowErrorIf(c, a, m) ThrowErrorIfNot(c,!(a), m)