Skip to content

Commit fcfb253

Browse files
add some debug
1 parent 4ea28c1 commit fcfb253

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples_tests/39.DenoiserTonemapper/CommandLineHandler.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,11 @@ nbl::core::matrix3x4SIMD CommandLineHandler::getCameraTransform(uint64_t id)
327327

328328
auto startTime = std::chrono::steady_clock::now();
329329
auto meshes_bundle = assetManager->getAsset(filePath.data(), mitsubaLoaderParams);
330-
assert(!meshes_bundle.getContents().empty(), ("ERROR (" + std::to_string(__LINE__) + " line): The xml file is invalid! Id of input stride: " + std::to_string(id)).c_str());
330+
if (meshes_bundle.getContents().empty())
331+
{
332+
os::Printer::log("ERROR (" + std::to_string(__LINE__) + " line): The xml file is invalid/cannot be loaded! Id of input file: " + std::to_string(id) + ". File path: " + filePath, ELL_ERROR);
333+
exit(-1);
334+
}
331335
auto endTime = std::chrono::steady_clock::now();
332336
elapsedTimeXmls += (endTime - startTime);
333337

@@ -339,7 +343,7 @@ nbl::core::matrix3x4SIMD CommandLineHandler::getCameraTransform(uint64_t id)
339343
if (validateFlag)
340344
{
341345
os::Printer::log("ERROR (" + std::to_string(__LINE__) + " line): The is no transform matrix in " + filePath + " ! Id of input stride: " + std::to_string(id), ELL_ERROR);
342-
assert(validateFlag);
346+
exit(-2);
343347
}
344348

345349
auto transformReference = mitsubaMetadata->m_global.m_sensors[0].transform.matrix.extractSub3x4();
@@ -378,7 +382,7 @@ nbl::core::matrix3x4SIMD CommandLineHandler::getCameraTransform(uint64_t id)
378382
default:
379383
{
380384
os::Printer::log("ERROR (" + std::to_string(__LINE__) + " line): " + std::string(CAMERA_TRANSFORM.data()) + " isn't a path nor a valid matrix! Id of input stride: " + std::to_string(id), ELL_ERROR);
381-
assert(false);
385+
exit(-3);
382386
}
383387
}
384388
}

0 commit comments

Comments
 (0)