aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/poco/Foundation/src/ErrorHandler.cpp
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/poco/Foundation/src/ErrorHandler.cpp
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/poco/Foundation/src/ErrorHandler.cpp')
-rw-r--r--contrib/libs/poco/Foundation/src/ErrorHandler.cpp228
1 files changed, 114 insertions, 114 deletions
diff --git a/contrib/libs/poco/Foundation/src/ErrorHandler.cpp b/contrib/libs/poco/Foundation/src/ErrorHandler.cpp
index 582565dc3f..d0af8ea8a1 100644
--- a/contrib/libs/poco/Foundation/src/ErrorHandler.cpp
+++ b/contrib/libs/poco/Foundation/src/ErrorHandler.cpp
@@ -1,114 +1,114 @@
-//
-// ErrorHandler.cpp
-//
-// Library: Foundation
-// Package: Threading
-// Module: ErrorHandler
-//
-// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
-// and Contributors.
-//
-// SPDX-License-Identifier: BSL-1.0
-//
-
-
-#include "Poco/ErrorHandler.h"
-#include "Poco/SingletonHolder.h"
-
-
-namespace Poco {
-
-
-ErrorHandler* ErrorHandler::_pHandler = ErrorHandler::defaultHandler();
-FastMutex ErrorHandler::_mutex;
-
-
-ErrorHandler::ErrorHandler()
-{
-}
-
-
-ErrorHandler::~ErrorHandler()
-{
-}
-
-
-void ErrorHandler::exception(const Exception& exc)
-{
- poco_debugger_msg(exc.what());
-}
-
-
-void ErrorHandler::exception(const std::exception& exc)
-{
- poco_debugger_msg(exc.what());
-}
-
-
-void ErrorHandler::exception()
-{
- poco_debugger_msg("unknown exception");
-}
-
-
-void ErrorHandler::handle(const Exception& exc)
-{
- FastMutex::ScopedLock lock(_mutex);
- try
- {
- _pHandler->exception(exc);
- }
- catch (...)
- {
- }
-}
-
-
-void ErrorHandler::handle(const std::exception& exc)
-{
- FastMutex::ScopedLock lock(_mutex);
- try
- {
- _pHandler->exception(exc);
- }
- catch (...)
- {
- }
-}
-
-
-void ErrorHandler::handle()
-{
- FastMutex::ScopedLock lock(_mutex);
- try
- {
- _pHandler->exception();
- }
- catch (...)
- {
- }
-}
-
-
-ErrorHandler* ErrorHandler::set(ErrorHandler* pHandler)
-{
- poco_check_ptr(pHandler);
-
- FastMutex::ScopedLock lock(_mutex);
- ErrorHandler* pOld = _pHandler;
- _pHandler = pHandler;
- return pOld;
-}
-
-
-ErrorHandler* ErrorHandler::defaultHandler()
-{
- // NOTE: Since this is called to initialize the static _pHandler
- // variable, sh has to be a local static, otherwise we run
- // into static initialization order issues.
- static SingletonHolder<ErrorHandler> sh;
- return sh.get();
-}
-
-
-} // namespace Poco
+//
+// ErrorHandler.cpp
+//
+// Library: Foundation
+// Package: Threading
+// Module: ErrorHandler
+//
+// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// SPDX-License-Identifier: BSL-1.0
+//
+
+
+#include "Poco/ErrorHandler.h"
+#include "Poco/SingletonHolder.h"
+
+
+namespace Poco {
+
+
+ErrorHandler* ErrorHandler::_pHandler = ErrorHandler::defaultHandler();
+FastMutex ErrorHandler::_mutex;
+
+
+ErrorHandler::ErrorHandler()
+{
+}
+
+
+ErrorHandler::~ErrorHandler()
+{
+}
+
+
+void ErrorHandler::exception(const Exception& exc)
+{
+ poco_debugger_msg(exc.what());
+}
+
+
+void ErrorHandler::exception(const std::exception& exc)
+{
+ poco_debugger_msg(exc.what());
+}
+
+
+void ErrorHandler::exception()
+{
+ poco_debugger_msg("unknown exception");
+}
+
+
+void ErrorHandler::handle(const Exception& exc)
+{
+ FastMutex::ScopedLock lock(_mutex);
+ try
+ {
+ _pHandler->exception(exc);
+ }
+ catch (...)
+ {
+ }
+}
+
+
+void ErrorHandler::handle(const std::exception& exc)
+{
+ FastMutex::ScopedLock lock(_mutex);
+ try
+ {
+ _pHandler->exception(exc);
+ }
+ catch (...)
+ {
+ }
+}
+
+
+void ErrorHandler::handle()
+{
+ FastMutex::ScopedLock lock(_mutex);
+ try
+ {
+ _pHandler->exception();
+ }
+ catch (...)
+ {
+ }
+}
+
+
+ErrorHandler* ErrorHandler::set(ErrorHandler* pHandler)
+{
+ poco_check_ptr(pHandler);
+
+ FastMutex::ScopedLock lock(_mutex);
+ ErrorHandler* pOld = _pHandler;
+ _pHandler = pHandler;
+ return pOld;
+}
+
+
+ErrorHandler* ErrorHandler::defaultHandler()
+{
+ // NOTE: Since this is called to initialize the static _pHandler
+ // variable, sh has to be a local static, otherwise we run
+ // into static initialization order issues.
+ static SingletonHolder<ErrorHandler> sh;
+ return sh.get();
+}
+
+
+} // namespace Poco