mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
fix: review comments
This commit is contained in:
parent
61fe1ff944
commit
a9b7be3c0e
1 changed files with 1 additions and 10 deletions
|
@ -363,16 +363,7 @@ GenericError ExecutionState::GetError() const {
|
|||
}
|
||||
|
||||
void ExecutionState::ReportCancelError() {
|
||||
std::string cancel_reason = "ExecutionState cancelled";
|
||||
|
||||
// Add additional information about the reason for cancellation, if possible
|
||||
// Possible to extract from system errors or context
|
||||
std::error_code sys_err = std::error_code(errno, std::system_category());
|
||||
if (sys_err && sys_err != std::errc::operation_canceled) {
|
||||
absl::StrAppend(&cancel_reason, " due to system error: ", sys_err.message());
|
||||
}
|
||||
|
||||
ReportError(std::make_error_code(errc::operation_canceled), cancel_reason);
|
||||
ReportError(std::make_error_code(errc::operation_canceled), "ExecutionState cancelled");
|
||||
}
|
||||
|
||||
void ExecutionState::Reset(ErrHandler handler) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue