mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
storage file - change error code [#add_table_function_file]
This commit is contained in:
parent
e8ae0343ed
commit
40b41c3c6e
@ -34,6 +34,7 @@ namespace ErrorCodes
|
||||
extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
|
||||
extern const int UNKNOWN_IDENTIFIER;
|
||||
extern const int INCORRECT_FILE_NAME;
|
||||
extern const int FILE_DOESNT_EXIST;
|
||||
extern const int EMPTY_LIST_OF_COLUMNS_PASSED;
|
||||
};
|
||||
|
||||
@ -55,7 +56,7 @@ static void checkCreationIsAllowed(Context & context_global, const std::string &
|
||||
|
||||
Poco::File table_path_poco_file = Poco::File(table_path);
|
||||
if (!table_path_poco_file.exists())
|
||||
throw Exception("File " + table_path + " is not exists", ErrorCodes::INCORRECT_FILE_NAME);
|
||||
throw Exception("File " + table_path + " is not exists", ErrorCodes::FILE_DOESNT_EXIST);
|
||||
else if (table_path_poco_file.isDirectory())
|
||||
throw Exception("File " + table_path + " must not be a directory", ErrorCodes::INCORRECT_FILE_NAME);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user