aboutsummaryrefslogtreecommitdiff
path: root/src/common/DataStores/DB2FileLoader.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-03-21 21:07:23 +0100
committerShauren <shauren.trinity@gmail.com>2024-03-21 21:07:23 +0100
commitac5aee6a98be6434e1f93bf5c973701e41a4540a (patch)
tree0cb621804e753e0afd81b5230b04a41f04220a5f /src/common/DataStores/DB2FileLoader.cpp
parente99482ce9bb7918e23a104fe28305c60d28ed598 (diff)
Core: Updated to 10.2.6.53840
Diffstat (limited to 'src/common/DataStores/DB2FileLoader.cpp')
-rw-r--r--src/common/DataStores/DB2FileLoader.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/common/DataStores/DB2FileLoader.cpp b/src/common/DataStores/DB2FileLoader.cpp
index 57ec7df6e3f..7a586178794 100644
--- a/src/common/DataStores/DB2FileLoader.cpp
+++ b/src/common/DataStores/DB2FileLoader.cpp
@@ -2076,19 +2076,23 @@ void DB2FileLoader::Load(DB2FileSource* source, DB2FileLoadInfo const* loadInfo)
if (loadInfo)
{
uint32 fieldIndex = 0;
+ std::string signValidationResult;
if (!loadInfo->Meta->HasIndexFieldInData())
{
- ASSERT(!loadInfo->Fields[0].IsSigned, "ID must be unsigned in %s", source->GetFileName());
+ if (loadInfo->Fields[0].IsSigned)
+ signValidationResult += Trinity::StringFormat("ID must be unsigned in {}", source->GetFileName());
++fieldIndex;
}
for (uint32 f = 0; f < loadInfo->Meta->FieldCount; ++f)
{
- ASSERT(loadInfo->Fields[fieldIndex].IsSigned == _impl->IsSignedField(f),
- "Field %s in %s must be %s%s", loadInfo->Fields[fieldIndex].Name, source->GetFileName(), _impl->IsSignedField(f) ? "signed" : "unsigned",
- _impl->GetExpectedSignMismatchReason(f));
+ if (loadInfo->Fields[fieldIndex].IsSigned != _impl->IsSignedField(f))
+ signValidationResult += Trinity::StringFormat("Field {} in {} must be {}{}", loadInfo->Fields[fieldIndex].Name,
+ source->GetFileName(), _impl->IsSignedField(f) ? "signed" : "unsigned", _impl->GetExpectedSignMismatchReason(f));
fieldIndex += loadInfo->Meta->Fields[f].ArraySize;
}
+ if (!signValidationResult.empty())
+ throw DB2FileLoadException(std::move(signValidationResult));
}
}