Skip to content

Commit c7bc76d

Browse files
Merge pull request #766 from Devsh-Graphics-Programming/ali_pel
CHLSLCompiler: improve boost::wave exception error logging
2 parents da92c04 + c8f8ce7 commit c7bc76d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/nbl/asset/utils/CHLSLCompiler.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,13 @@ std::string CHLSLCompiler::preprocessShader(std::string&& code, IShader::E_SHADE
352352
}
353353
catch (boost::wave::preprocess_exception& e)
354354
{
355-
preprocessOptions.logger.log("Boost.Wave %s exception caught!",system::ILogger::ELL_ERROR,e.what());
355+
preprocessOptions.logger.log("%s exception caught. %s [%s:%d:%d]",system::ILogger::ELL_ERROR,e.what(),e.description(),e.file_name(),e.line_no(),e.column_no());
356+
return {};
356357
}
357358
catch (...)
358359
{
359360
preprocessOptions.logger.log("Unknown exception caught!",system::ILogger::ELL_ERROR);
361+
return {};
360362
}
361363

362364
// for debugging cause MSVC doesn't like to show more than 21k LoC in TextVisualizer

0 commit comments

Comments
 (0)