File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ Status PyBuffer::Init(PyObject* obj) {
8181 }
8282 return Status::OK ();
8383 } else {
84- return Status (StatusCode::Invalid, " Couldn't convert to buffer. " ,
85- std::make_shared<PythonErrorDetail>() );
84+ auto detail = std::make_shared<PythonErrorDetail>();
85+ return Status (StatusCode::Invalid, " Couldn't convert to buffer. " , detail );
8686 }
8787}
8888
@@ -149,8 +149,8 @@ Status PassPyError() {
149149 if (PyErr_Occurred ()) {
150150 // Do not call PyErr_Clear, the assumption is that someone further
151151 // up the call stack will want to deal with the Python error.
152- return Status (StatusCode::UnknownError, " Python Error " ,
153- std::make_shared<PythonErrorDetail>() );
152+ auto detail = std::make_shared<PythonErrorDetail>();
153+ return Status (StatusCode::UnknownError, " Python Error " , detail );
154154 }
155155 return Status::OK ();
156156}
You can’t perform that action at this time.
0 commit comments