Enhance logging error in rocDecode library - let the upper level class prints the correct error code string instead of integer code from lower levels (#223)

This commit is contained in:
Aryan Salmanpour
2024-02-06 13:35:41 -05:00
committed by GitHub
parent 38f50a1a10
commit 15526253c7
4 changed files with 37 additions and 37 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ private:
rocDecStatus error_code = rocDecAPI; \
if( error_code != ROCDEC_SUCCESS) { \
std::ostringstream error_log; \
error_log << #rocDecAPI << " returned err " << rocDecGetErrorName(error_code) << " at " <<__FILE__ <<":" << __LINE__;\
error_log << #rocDecAPI << " returned " << rocDecGetErrorName(error_code) << " at " <<__FILE__ <<":" << __LINE__;\
ROCDEC_THROW(error_log.str(), error_code); \
} \
} while (0)