Add blocked_from_network_thread error
This commit is contained in:
parent
3c3943f64f
commit
0beab42b78
|
@ -110,6 +110,10 @@ FoundationDB may return the following error codes from API functions. If you nee
|
|||
+-----------------------------------------------+-----+--------------------------------------------------------------------------------+
|
||||
| transaction_read_only | 2023| Attempted to commit a transaction specified as read-only |
|
||||
+-----------------------------------------------+-----+--------------------------------------------------------------------------------+
|
||||
| invalid_cache_eviction_policy | 2024| Invalid cache eviction policy, only random and lru are supported |
|
||||
+-----------------------------------------------+-----+--------------------------------------------------------------------------------+
|
||||
| blocked_from_network_thread | 2025| Attempted to block in a callback called from the network thread. |
|
||||
+-----------------------------------------------+-----+--------------------------------------------------------------------------------+
|
||||
| incompatible_protocol_version | 2100| Incompatible protocol version |
|
||||
+-----------------------------------------------+-----+--------------------------------------------------------------------------------+
|
||||
| transaction_too_large | 2101| Transaction exceeds byte limit |
|
||||
|
|
|
@ -198,8 +198,7 @@ public:
|
|||
|
||||
void blockUntilReady() {
|
||||
if (g_network->isOnMainThread()) {
|
||||
TraceEvent(SevWarnAlways, "AttemptToBlockOnMainThread").error(client_invalid_operation());
|
||||
throw client_invalid_operation();
|
||||
throw blocked_from_network_thread();
|
||||
}
|
||||
if (!isReady()) {
|
||||
BlockCallback cb(*this);
|
||||
|
|
|
@ -135,6 +135,7 @@ ERROR( no_commit_version, 2021, "Transaction is read-only and therefore does not
|
|||
ERROR( environment_variable_network_option_failed, 2022, "Environment variable network option could not be set" )
|
||||
ERROR( transaction_read_only, 2023, "Attempted to commit a transaction specified as read-only" )
|
||||
ERROR( invalid_cache_eviction_policy, 2024, "Invalid cache eviction policy, only random and lru are supported" )
|
||||
ERROR( blocked_from_network_thread, 2025, "Attempted to block in a callback called from the network thread." )
|
||||
|
||||
ERROR( incompatible_protocol_version, 2100, "Incompatible protocol version" )
|
||||
ERROR( transaction_too_large, 2101, "Transaction exceeds byte limit" )
|
||||
|
|
Loading…
Reference in New Issue