-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -936,7 +936,20 @@ irods::error exec_rule_text( | |
_e.code(), | ||
_e.what()); | ||
} | ||
|
||
catch(const std::exception & _e) { | ||
rodsLog(LOG_ERROR,"std::exception (%s) in FILE %s LINE %d FUNCTION %s ", | ||
_e.what(),__FILE__,__LINE__,__FUNCTION__); | ||
return ERROR( | ||
SYS_NOT_SUPPORTED, | ||
_e.what()); | ||
} | ||
catch(...) { | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Can we make this |
||
"Unknown error"); | ||
} | ||
return SUCCESS(); | ||
} // exec_rule_text | ||
|
||
|
@@ -1142,6 +1155,20 @@ irods::error exec_rule_expression( | |
_e.code(), | ||
_e.what()); | ||
} | ||
catch(const std::exception & _e) { | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Same here about |
||
_e.what()); | ||
} | ||
catch(...) { | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Same here about |
||
"Unknown error"); | ||
} | ||
|
||
return SUCCESS(); | ||
|
||
|
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. :)