MCPcopy Create free account
hub / github.com/apache/arrow / ToString

Method ToString

python/pyarrow/src/arrow/python/common.cc:92–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 const char* type_id() const override { return kErrorDetailTypeId; }
91
92 std::string ToString() const override {
93 // This is simple enough not to need the GIL
94 Result<std::string> result = FormatImpl();
95
96 if (result.ok()) {
97 return result.ValueOrDie();
98 } else {
99 // Fallback to just the exception type
100 const auto ty = reinterpret_cast<const PyTypeObject*>(exc_type_.obj());
101 return std::string("Python exception: ") + ty->tp_name;
102 }
103 }
104
105 void RestorePyError() const {
106 Py_INCREF(exc_type_.obj());

Callers

nothing calls this directly

Calls 2

ValueOrDieMethod · 0.80
okMethod · 0.45

Tested by

no test coverage detected