debug
This commit is contained in:
parent
d9c0012c75
commit
7bb8108410
|
@ -356,6 +356,17 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
|||
}
|
||||
std::cout << " 回调执行成功" << std::endl;
|
||||
|
||||
} catch (const py::error_already_set& e) {
|
||||
std::cerr << "[PYTHON ERROR] ";
|
||||
PyErr_Print(); // 自动打印到stderr
|
||||
// 可选:获取更详细的错误信息
|
||||
if (PyErr_Occurred()) {
|
||||
PyObject *type, *value, *traceback;
|
||||
PyErr_Fetch(&type, &value, &traceback);
|
||||
std::cerr << "Details: "
|
||||
<< PyUnicode_AsUTF8(PyObject_Str(value)) << std::endl;
|
||||
PyErr_Restore(type, value, traceback);
|
||||
}
|
||||
} catch (...) {
|
||||
std::cout << "[ERROR] 回调执行失败" << std::endl;
|
||||
munmap(ptr, data_size);
|
||||
|
|
Loading…
Reference in New Issue