mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
fix error reporting of python syntax errors
This commit is contained in:
@@ -303,6 +303,9 @@ if (WIN32)
|
||||
target_link_libraries(${PROJECT_NAME} ws2_32)
|
||||
endif()
|
||||
|
||||
#target_compile_options(${PROJECT_NAME} PRIVATE -flto)
|
||||
#target_link_libraries(${PROJECT_NAME} -flto)
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "stdafx.h")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
|
||||
cotire(${PROJECT_NAME})
|
||||
|
||||
@@ -383,7 +383,8 @@ void python_taskqueue::run( GLFWwindow *Context, rendertask_sequence &Tasks, upl
|
||||
std::lock_guard<std::mutex> lock(Upload_Tasks.mutex);
|
||||
Upload_Tasks.data.push_back(task);
|
||||
}
|
||||
error();
|
||||
if( PyErr_Occurred() != nullptr )
|
||||
error();
|
||||
}
|
||||
// clear the thread state
|
||||
PyEval_SaveThread();
|
||||
@@ -415,8 +416,6 @@ void python_taskqueue::update()
|
||||
void
|
||||
python_taskqueue::error() {
|
||||
|
||||
if( PyErr_Occurred() == nullptr ) { return; }
|
||||
|
||||
if( m_stderr != nullptr ) {
|
||||
// std err pythona jest buforowane
|
||||
PyErr_Print();
|
||||
|
||||
Reference in New Issue
Block a user