File tree 2 files changed +13
-6
lines changed
2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -139,9 +139,16 @@ string IPCSocket::sendRequest(string const& _req)
139
139
140
140
RPCSession& RPCSession::instance (const string& _path)
141
141
{
142
- static RPCSession session (_path);
143
- BOOST_REQUIRE_EQUAL (session.m_ipcSocket .path (), _path);
144
- return session;
142
+ try
143
+ {
144
+ static RPCSession session (_path);
145
+ BOOST_REQUIRE_EQUAL (session.m_ipcSocket .path (), _path);
146
+ return session;
147
+ }
148
+ catch (std::exception const &)
149
+ {
150
+ BOOST_THROW_EXCEPTION (std::runtime_error (" Error creating RPC session for socket: " + _path));
151
+ }
145
152
}
146
153
147
154
string RPCSession::eth_getCode (string const & _address, string const & _blockNumber)
Original file line number Diff line number Diff line change @@ -124,19 +124,19 @@ TestTool::Result TestTool::process()
124
124
catch (boost::exception const & _e)
125
125
{
126
126
AnsiColorized (cout, m_formatted, {BOLD, RED}) <<
127
- " Exception during syntax test: " << boost::diagnostic_information (_e) << endl;
127
+ " Exception during test: " << boost::diagnostic_information (_e) << endl;
128
128
return Result::Exception;
129
129
}
130
130
catch (std::exception const & _e)
131
131
{
132
132
AnsiColorized (cout, m_formatted, {BOLD, RED}) <<
133
- " Exception during syntax test: " << _e.what () << endl;
133
+ " Exception during test: " << _e.what () << endl;
134
134
return Result::Exception;
135
135
}
136
136
catch (...)
137
137
{
138
138
AnsiColorized (cout, m_formatted, {BOLD, RED}) <<
139
- " Unknown exception during syntax test." << endl;
139
+ " Unknown exception during test." << endl;
140
140
return Result::Exception;
141
141
}
142
142
You can’t perform that action at this time.
0 commit comments