1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-4368 Unified exceptions handling code in dbcon/joblist

This commit is contained in:
Roman Nozdrin
2020-10-19 16:49:52 +00:00
parent 92d861d980
commit cd48df99e5
20 changed files with 296 additions and 475 deletions

View File

@ -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
@ -447,23 +448,12 @@ next:
dlMutex.unlock();
}
}
catch (boost::exception& e)
{
ostringstream oss;
oss << "TupleHashJoinStep::smallRunnerFcn failed due to " << boost::diagnostic_information(e);
fLogger->logMessage(logging::LOG_TYPE_ERROR, oss.str());
status(logging::ERR_EXEMGR_MALFUNCTION);
}
catch (std::exception& e)
{
ostringstream oss;
oss << "TupleHashJoinStep::smallRunnerFcn failed due to " << e.what();
fLogger->logMessage(logging::LOG_TYPE_ERROR, oss.str());
status(logging::ERR_EXEMGR_MALFUNCTION);
}
catch (...)
{
fLogger->logMessage(logging::LOG_TYPE_ERROR, "TupleHashJoinStep::smallRunnerFcn failed due to an unknown reason (...)");
handleException(std::current_exception(),
logging::ERR_EXEMGR_MALFUNCTION,
logging::ERR_JOIN_TOO_BIG,
"TupleHashJoinStep::smallRunnerFcn()");
status(logging::ERR_EXEMGR_MALFUNCTION);
}
@ -755,28 +745,13 @@ void TupleHashJoinStep::hjRunner()
rgData[djsJoinerMap[i]].swap(empty);
}
}
catch (logging::IDBExcept& e)
catch (...)
{
cout << e.what() << endl;
if (!status())
{
errorMessage(logging::IDBErrorInfo::instance()->errorMsg(e.errorCode()));
status(e.errorCode());
}
abort();
}
catch (std::exception& e)
{
cout << e.what() << endl;
if (!status())
{
errorMessage(logging::IDBErrorInfo::instance()->errorMsg(logging::ERR_DBJ_UNKNOWN_ERROR));
status(logging::ERR_DBJ_UNKNOWN_ERROR);
}
handleException(std::current_exception(),
logging::ERR_EXEMGR_MALFUNCTION,
logging::ERR_JOIN_TOO_BIG,
"TupleHashJoinStep::hjRunner()");
status(logging::ERR_EXEMGR_MALFUNCTION);
abort();
}