aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/matplotlib/py3/src/py_exceptions.h
diff options
context:
space:
mode:
authormaxim-yurchuk <maxim-yurchuk@yandex-team.com>2025-02-11 13:26:52 +0300
committermaxim-yurchuk <maxim-yurchuk@yandex-team.com>2025-02-11 13:57:59 +0300
commitf895bba65827952ed934b2b46f9a45e30a191fd2 (patch)
tree03260c906d9ec41cdc03e2a496b15d407459cec0 /contrib/python/matplotlib/py3/src/py_exceptions.h
parent5f7060466f7b9707818c2091e1a25c14f33c3474 (diff)
downloadydb-f895bba65827952ed934b2b46f9a45e30a191fd2.tar.gz
Remove deps on pandas
<https://github.com/ydb-platform/ydb/pull/14418> <https://github.com/ydb-platform/ydb/pull/14419> \-- аналогичные правки в gh Хочу залить в обход синка, чтобы посмотреть удалится ли pandas в нашей gh репе через piglet commit_hash:abca127aa37d4dbb94b07e1e18cdb8eb5b711860
Diffstat (limited to 'contrib/python/matplotlib/py3/src/py_exceptions.h')
-rw-r--r--contrib/python/matplotlib/py3/src/py_exceptions.h72
1 files changed, 0 insertions, 72 deletions
diff --git a/contrib/python/matplotlib/py3/src/py_exceptions.h b/contrib/python/matplotlib/py3/src/py_exceptions.h
deleted file mode 100644
index c4accf26340..00000000000
--- a/contrib/python/matplotlib/py3/src/py_exceptions.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- mode: c++; c-basic-offset: 4 -*- */
-
-#ifndef MPL_PY_EXCEPTIONS_H
-#define MPL_PY_EXCEPTIONS_H
-
-#include <exception>
-#include <stdexcept>
-
-namespace py
-{
-class exception : public std::exception
-{
- public:
- const char *what() const throw()
- {
- return "python error has been set";
- }
-};
-}
-
-#define CALL_CPP_FULL(name, a, cleanup, errorcode) \
- try \
- { \
- a; \
- } \
- catch (const py::exception &) \
- { \
- { \
- cleanup; \
- } \
- return (errorcode); \
- } \
- catch (const std::bad_alloc &) \
- { \
- PyErr_Format(PyExc_MemoryError, "In %s: Out of memory", (name)); \
- { \
- cleanup; \
- } \
- return (errorcode); \
- } \
- catch (const std::overflow_error &e) \
- { \
- PyErr_Format(PyExc_OverflowError, "In %s: %s", (name), e.what()); \
- { \
- cleanup; \
- } \
- return (errorcode); \
- } \
- catch (const std::runtime_error &e) \
- { \
- PyErr_Format(PyExc_RuntimeError, "In %s: %s", (name), e.what()); \
- { \
- cleanup; \
- } \
- return (errorcode); \
- } \
- catch (...) \
- { \
- PyErr_Format(PyExc_RuntimeError, "Unknown exception in %s", (name)); \
- { \
- cleanup; \
- } \
- return (errorcode); \
- }
-
-#define CALL_CPP_CLEANUP(name, a, cleanup) CALL_CPP_FULL(name, a, cleanup, 0)
-
-#define CALL_CPP(name, a) CALL_CPP_FULL(name, a, , 0)
-
-#define CALL_CPP_INIT(name, a) CALL_CPP_FULL(name, a, , -1)
-
-#endif