Skip to content
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

Draft
wants to merge 1 commit into
base: 4-2-stable
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion libirods_rule_engine_plugin-indexing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Contributor

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. :)

_e.what());
}
catch(...) {
rodsLog(LOG_ERROR,"Unknown error in FILE %s LINE %d FUNCTION %s ",
__FILE__,__LINE__,__FUNCTION__);
return ERROR(
SYS_NOT_SUPPORTED,
Copy link
Contributor

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?

"Unknown error");
}
return SUCCESS();
} // exec_rule_text

Expand Down Expand Up @@ -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,
Copy link
Contributor

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

_e.what());
}
catch(...) {
rodsLog(LOG_ERROR,"Unknown error in FILE %s LINE %d FUNCTION %s ",
__FILE__,__LINE__,__FUNCTION__);
return ERROR(
SYS_NOT_SUPPORTED,
Copy link
Contributor

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

"Unknown error");
}

return SUCCESS();

Expand Down