mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-24 18:50:49 +00:00
Use existing ErrorCode to indicate SELECT failure
This commit is contained in:
parent
80827b5a9f
commit
5849d66975
@ -58,7 +58,7 @@ namespace DB
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int UNSUPPORTED_METHOD;
|
||||
extern const int SELECT_DB_FAILURE;
|
||||
extern const int CANNOT_SELECT;
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ namespace DB
|
||||
std::string reply = client->execute<std::string>(command);
|
||||
if (reply != "+OK\r\n")
|
||||
throw Exception{"Selecting db with index " + DB::toString(db_index) + " failed with reason " + reply,
|
||||
ErrorCodes::SELECT_DB_FAILURE};
|
||||
ErrorCodes::CANNOT_SELECT};
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user