|
@ -27,16 +27,12 @@ using namespace std; |
|
|
using namespace dev; |
|
|
using namespace dev; |
|
|
using namespace dev::eth; |
|
|
using namespace dev::eth; |
|
|
|
|
|
|
|
|
#if ALL_COMPILERS_ARE_CPP11_COMPLIANT |
|
|
#if _MSC_VER |
|
|
#define ETH_RETURN_STRING(S) thread_local static string s_what; s_what = S; return s_what.c_str(); |
|
|
#define thread_local __declspec( thread ) |
|
|
#else |
|
|
|
|
|
#define ETH_RETURN_STRING(S) \ |
|
|
|
|
|
static boost::thread_specific_ptr<string> s_what; \ |
|
|
|
|
|
if (!s_what.get()) \ |
|
|
|
|
|
s_what.reset(new string); \ |
|
|
|
|
|
*s_what = S; return s_what->c_str(); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define ETH_RETURN_STRING(S) thread_local static string s_what; s_what = S; return s_what.c_str(); |
|
|
|
|
|
|
|
|
const char* InvalidBlockFormat::what() const noexcept { ETH_RETURN_STRING("Invalid block format: Bad field " + toString(m_f) + " (" + toHex(m_d) + ")"); } |
|
|
const char* InvalidBlockFormat::what() const noexcept { ETH_RETURN_STRING("Invalid block format: Bad field " + toString(m_f) + " (" + toHex(m_d) + ")"); } |
|
|
const char* UncleInChain::what() const noexcept { ETH_RETURN_STRING("Uncle in block already mentioned: Uncles " + toString(m_uncles) + " (" + m_block.abridged() + ")"); } |
|
|
const char* UncleInChain::what() const noexcept { ETH_RETURN_STRING("Uncle in block already mentioned: Uncles " + toString(m_uncles) + " (" + m_block.abridged() + ")"); } |
|
|
const char* InvalidTransactionsHash::what() const noexcept { ETH_RETURN_STRING("Invalid transactions hash: header says: " + toHex(m_head.ref()) + " block is:" + toHex(m_real.ref())); } |
|
|
const char* InvalidTransactionsHash::what() const noexcept { ETH_RETURN_STRING("Invalid transactions hash: header says: " + toHex(m_head.ref()) + " block is:" + toHex(m_real.ref())); } |
|
|