Remove all runtime errors. (#1840)

This commit is contained in:
Melih Elibol
2018-04-06 17:20:52 -07:00
committed by Robert Nishihara
parent c7e11e9057
commit 3bf80839cb
7 changed files with 10 additions and 20 deletions
+1 -3
View File
@@ -86,9 +86,7 @@ class ConnectionPool {
ray::Status RemoveSender(ConnectionType type, std::shared_ptr<SenderConnection> conn);
/// This object cannot be copied for thread-safety.
ConnectionPool &operator=(const ConnectionPool &o) {
throw std::runtime_error("Can't copy ConnectionPool.");
}
RAY_DISALLOW_COPY_AND_ASSIGN(ConnectionPool);
private:
/// A container type that maps ClientID to a connection type.
+2 -4
View File
@@ -110,10 +110,8 @@ class ObjectDirectory : public ObjectDirectoryInterface {
/// Ray only (not part of the OD interface).
ObjectDirectory(std::shared_ptr<gcs::AsyncGcsClient> gcs_client);
/// This object cannot be copied for thread-safety.
ObjectDirectory &operator=(const ObjectDirectory &o) {
throw std::runtime_error("Can't copy ObjectDirectory.");
}
/// ObjectDirectory should not be copied.
RAY_DISALLOW_COPY_AND_ASSIGN(ObjectDirectory);
private:
/// Callbacks associated with a call to GetLocations.
@@ -47,7 +47,7 @@ void ObjectStoreNotificationManager::ProcessStoreLength(
void ObjectStoreNotificationManager::ProcessStoreNotification(
const boost::system::error_code &error) {
if (error) {
throw std::runtime_error("ObjectStore may have died.");
RAY_LOG(FATAL) << error.message();
}
const auto &object_info = flatbuffers::GetRoot<ObjectInfo>(notification_.data());
@@ -103,9 +103,7 @@ class TestObjectManagerBase : public ::testing::Test {
" 1> /dev/null 2> /dev/null &";
RAY_LOG(DEBUG) << plasma_command;
int ec = system(plasma_command.c_str());
if (ec != 0) {
throw std::runtime_error("failed to start plasma store.");
};
RAY_CHECK(ec == 0);
return store_id;
}
@@ -94,9 +94,7 @@ class TestObjectManager : public ::testing::Test {
" 1> /dev/null 2> /dev/null &";
RAY_LOG(DEBUG) << plasma_command;
int ec = system(plasma_command.c_str());
if (ec != 0) {
throw std::runtime_error("failed to start plasma store.");
};
RAY_CHECK(ec == 0);
return store_id;
}
+3 -3
View File
@@ -55,6 +55,8 @@ class TransferQueue {
}
};
TransferQueue() = default;
/// Queues a send.
///
/// \param client_id The ClientID to which the object needs to be sent.
@@ -103,9 +105,7 @@ class TransferQueue {
ray::Status RemoveContext(const UniqueID &id);
/// This object cannot be copied for thread-safety.
TransferQueue &operator=(const TransferQueue &o) {
throw std::runtime_error("Can't copy TransferQueue.");
}
RAY_DISALLOW_COPY_AND_ASSIGN(TransferQueue);
private:
// TODO(hme): make this a shared mutex.
@@ -24,9 +24,7 @@ class TestObjectManagerBase : public ::testing::Test {
" 1> /dev/null 2> /dev/null &";
RAY_LOG(INFO) << plasma_command;
int ec = system(plasma_command.c_str());
if (ec != 0) {
throw std::runtime_error("failed to start plasma store.");
};
RAY_CHECK(ec == 0);
return store_id;
}