Skip to content

Commit

Permalink
revise error message in ipc_response
Browse files Browse the repository at this point in the history
  • Loading branch information
t-horikawa committed Dec 17, 2024
1 parent d84f83e commit 0cb4fe1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/tateyama/endpoint/ipc/bootstrap/server_wires_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,10 @@ class server_wire_container_impl : public server_wire_container
new resultset_wire_container_impl{shm_resultset_wires_->acquire(), *this, datachannel_buffer_size_}, resultset_wire_deleter_impl};
} catch(const boost::interprocess::interprocess_exception& ex) {
throw std::runtime_error(ex.what());
} catch (std::exception &ex) {
LOG_LP(ERROR) << "running out of boost managed shared memory";
} catch(const std::runtime_error& ex) {
throw ex;
} catch (const std::exception &ex) {
LOG_LP(ERROR) << "unknown error in resultset_wires_container_impl::acquire: " << ex.what();
throw ex;
}
}
Expand Down
9 changes: 7 additions & 2 deletions src/tateyama/endpoint/ipc/ipc_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,15 @@ tateyama::status ipc_data_channel::acquire(std::shared_ptr<tateyama::api::server
return tateyama::status::ok;
}
throw std::runtime_error("error in create ipc_writer");
} catch (std::exception &ex) {
} catch(const std::runtime_error& ex) {
wrt = nullptr;

LOG_LP(INFO) << "Running out of shared memory for result set transfers. Probably due to too many result sets being opened";
LOG_LP(INFO) << ex.what();
return tateyama::status::unknown;
} catch (const std::exception &ex) {
wrt = nullptr;

LOG_LP(ERROR) << "unknown error ipc_data_channel::acquire: " << ex.what();
return tateyama::status::unknown;
}
}
Expand Down

0 comments on commit 0cb4fe1

Please sign in to comment.