Throw EdenError when it's not implemented.

Summary: Calling a command that is not implemented will terminate the edenfs. It was ok for testing but now we have it running on Sandcastle, so will throw Eden error instead.

Reviewed By: chadaustin

Differential Revision: D18145495

fbshipit-source-id: 17e57f426d3cf80c93c2112741a027db8cbc6b8d
This commit is contained in:
Puneet Kaushik 2019-10-30 10:40:32 -07:00 committed by Facebook Github Bot
parent b1523f0862
commit fccc1343ba

View File

@ -8,6 +8,7 @@
#pragma once
#include <iostream>
#include <string>
#include "eden/fs/service/EdenError.h"
#include "eden/fs/utils/PathFuncs.h"
// This is a stub to compile eden/service on Window.
@ -73,11 +74,14 @@ static int unlink(const char* path) {
return _unlink(path);
}
#define NOT_IMPLEMENTED() \
do { \
std::cout << " +++++ NOT IMPLEMETED +++++++ Function: " << __FUNCTION__ \
<< " Line:" << __LINE__; \
throw; \
#define NOT_IMPLEMENTED() \
do { \
throw newEdenError( \
EdenErrorType::GENERIC_ERROR, \
" +++++ NOT IMPLEMETED +++++++ Function: ", \
__FUNCTION__, \
" Line: ", \
__LINE__); \
} while (true)
} // namespace eden