You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4368 Unified exceptions handling code in dbcon/joblist
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||
Copyright (c) 2016-2020 MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
@ -228,31 +229,14 @@ uint32_t WindowFunctionStep::nextBand(messageqcpp::ByteStream& bs)
|
||||
fEndOfResult = true;
|
||||
}
|
||||
}
|
||||
catch (IDBExcept& iex)
|
||||
{
|
||||
handleException(iex.what(), iex.errorCode());
|
||||
|
||||
while (more)
|
||||
more = fOutputDL->next(fOutputIterator, &rgDataOut);
|
||||
|
||||
fEndOfResult = true;
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
handleException(ex.what(), ERR_IN_DELIVERY);
|
||||
|
||||
while (more)
|
||||
more = fOutputDL->next(fOutputIterator, &rgDataOut);
|
||||
|
||||
fEndOfResult = true;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
handleException("WindowFunctionStep caught an unknown exception", ERR_IN_DELIVERY);
|
||||
|
||||
handleException(std::current_exception(),
|
||||
logging::ERR_IN_DELIVERY,
|
||||
logging::ERR_WF_DATA_SET_TOO_BIG,
|
||||
"WindowFunctionStep::nextBand()");
|
||||
while (more)
|
||||
more = fOutputDL->next(fOutputIterator, &rgDataOut);
|
||||
|
||||
fEndOfResult = true;
|
||||
}
|
||||
|
||||
@ -961,17 +945,12 @@ void WindowFunctionStep::execute()
|
||||
more = fInputDL->next(fInputIterator, &rgData);
|
||||
}
|
||||
} // try
|
||||
catch (const IDBExcept& idb)
|
||||
{
|
||||
handleException(idb.what(), idb.errorCode());
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
handleException(ex.what(), ERR_READ_INPUT_DATALIST);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
handleException("WindowFunctionStep caught an unknown exception", ERR_READ_INPUT_DATALIST);
|
||||
handleException(std::current_exception(),
|
||||
logging::ERR_READ_INPUT_DATALIST,
|
||||
logging::ERR_WF_DATA_SET_TOO_BIG,
|
||||
"WindowFunctionStep::execute()");
|
||||
}
|
||||
|
||||
if (traceOn())
|
||||
@ -1030,14 +1009,12 @@ void WindowFunctionStep::execute()
|
||||
}
|
||||
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
handleException(ex.what(), ERR_EXECUTE_WINDOW_FUNCTION);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
handleException("WindowFunctionStep caught an unknown exception",
|
||||
ERR_EXECUTE_WINDOW_FUNCTION);
|
||||
handleException(std::current_exception(),
|
||||
logging::ERR_EXECUTE_WINDOW_FUNCTION,
|
||||
logging::ERR_WF_DATA_SET_TOO_BIG,
|
||||
"WindowFunctionStep::execute()");
|
||||
}
|
||||
|
||||
fOutputDL->endOfInput();
|
||||
@ -1084,21 +1061,15 @@ void WindowFunctionStep::doFunction()
|
||||
(*fFunctions[i].get())();
|
||||
}
|
||||
}
|
||||
catch (IDBExcept& iex)
|
||||
{
|
||||
handleException(iex.what(), iex.errorCode());
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
handleException(ex.what(), ERR_EXECUTE_WINDOW_FUNCTION);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
handleException("doFunction caught an unknown exception", ERR_EXECUTE_WINDOW_FUNCTION);
|
||||
handleException(std::current_exception(),
|
||||
logging::ERR_EXECUTE_WINDOW_FUNCTION,
|
||||
logging::ERR_WF_DATA_SET_TOO_BIG,
|
||||
"WindowFunctionStep::doFunction()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WindowFunctionStep::doPostProcessForSelect()
|
||||
{
|
||||
FuncExp* fe = funcexp::FuncExp::instance();
|
||||
@ -1197,13 +1168,6 @@ void WindowFunctionStep::doPostProcessForDml()
|
||||
}
|
||||
|
||||
|
||||
void WindowFunctionStep::handleException(string errStr, int errCode)
|
||||
{
|
||||
cerr << "Exception: " << errStr << endl;
|
||||
catchHandler(errStr, errCode, fErrorInfo, fSessionId);
|
||||
}
|
||||
|
||||
|
||||
boost::shared_ptr<FrameBound> WindowFunctionStep::parseFrameBoundRows(
|
||||
const execplan::WF_Boundary& b,
|
||||
const map<uint64_t, uint64_t>& m,
|
||||
|
Reference in New Issue
Block a user