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)

[ROCm/rocdecode commit: 15526253c7]
This commit is contained in:
Aryan Salmanpour
2024-02-06 13:35:41 -05:00
committed by GitHub
parent c7f7a7c0e8
commit 881d06a244
4 changed files with 37 additions and 37 deletions
@@ -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)