Commit 454cae78 authored by David COME's avatar David COME
Browse files

temporarily disable the report of the explicit error code to the client

parent 193f18e5
...@@ -143,14 +143,16 @@ void DiskWriteTask::releaseAllBlock(){ ...@@ -143,14 +143,16 @@ void DiskWriteTask::releaseAllBlock(){
int errCode; int errCode;
if(mb->isFailed()){ if(mb->isFailed()){
errorMsg=mb->errorMsg(); errorMsg=mb->errorMsg();
errCode=mb->errorCode();
//disabled temporarily (see comment in MemBlock)
//errCode=mb->errorCode();
} }
else{ else{
errorMsg="Mistmatch between expected and received filed or blockid"; errorMsg="Mistmatch between expected and received filed or blockid";
errCode=SEINTERNAL; errCode=SEINTERNAL;
} }
lc.log(LOG_ERR,errorMsg); lc.log(LOG_ERR,errorMsg);
throw castor::exception::Exception(errCode,errorMsg); throw castor::exception::Exception(errorMsg);
} }
} }
......
...@@ -96,12 +96,14 @@ public: ...@@ -96,12 +96,14 @@ public:
throw castor::exception::Exception("Error Context is not set =" throw castor::exception::Exception("Error Context is not set ="
" no error message to give"); " no error message to give");
} }
/** /**
* Get the error code from the context, * Get the error code from the context,
* Throw an exception if there is no context * Throw an exception if there is no context
* @return * @return
*/ */
/* Out of the process, waiting to check if it is a good idea or not
* send the error code
int errorCode() const { int errorCode() const {
if(m_context.get()) { if(m_context.get()) {
return m_context->m_errorCode; return m_context->m_errorCode;
...@@ -109,7 +111,7 @@ public: ...@@ -109,7 +111,7 @@ public:
throw castor::exception::Exception("Error Context is not set =" throw castor::exception::Exception("Error Context is not set ="
" no error code to give"); " no error code to give");
} } */
/** /**
* Return true if the block has been marked as failed * Return true if the block has been marked as failed
......
...@@ -175,14 +175,15 @@ namespace daemon { ...@@ -175,14 +175,15 @@ namespace daemon {
int errCode; int errCode;
if(mb->isFailed()){ if(mb->isFailed()){
errorMsg=mb->errorMsg(); errorMsg=mb->errorMsg();
errCode=mb->errorCode(); //disabled temporarily (see comment in MemBlock)
//errCode=mb->errorCode();
} }
else{ else{
errorMsg="Mistmatch between expected and received filed or blockid"; errorMsg="Mistmatch between expected and received filed or blockid";
errCode=SEINTERNAL; errCode=SEINTERNAL;
} }
lc.log(LOG_ERR,errorMsg); lc.log(LOG_ERR,errorMsg);
throw castor::exception::Exception(errCode,errorMsg); throw castor::exception::Exception(errorMsg);
} }
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment