-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[irods#6286] catch all exceptions.(4-2-stable) #96
base: 4-2-stable
Are you sure you want to change the base?
Conversation
Even nlohmann::json errors will be caught and logged in an informative way, since the embedded message conveys their code and type.
rodsLog(LOG_ERROR,"Unknown error in FILE %s LINE %d FUNCTION %s ", | ||
__FILE__,__LINE__,__FUNCTION__); | ||
return ERROR( | ||
SYS_NOT_SUPPORTED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here about SYS_UNKNOWN_ERROR
rodsLog(LOG_ERROR,"std::exception (%s) in FILE %s LINE %d FUNCTION %s ", | ||
_e.what(),__FILE__,__LINE__,__FUNCTION__); | ||
return ERROR( | ||
SYS_NOT_SUPPORTED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here about SYS_INTERNAL_ERR
rodsLog(LOG_ERROR,"std::exception (%s) in FILE %s LINE %d FUNCTION %s ", | ||
_e.what(),__FILE__,__LINE__,__FUNCTION__); | ||
return ERROR( | ||
SYS_NOT_SUPPORTED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this SYS_INTERNAL_ERR
? This is the convention I had been following when working on other things. If you feel this error code is more appropriate in this situation, then let's stick with that. :)
rodsLog(LOG_ERROR,"Unknown error in FILE %s LINE %d FUNCTION %s ", | ||
__FILE__,__LINE__,__FUNCTION__); | ||
return ERROR( | ||
SYS_NOT_SUPPORTED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this SYS_UNKNOWN_ERROR
?
Even nlohmann::json errors will be caught and logged in an informative
way, since the embedded message conveys their code and type.