16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 23:19:19 +02:00

fix error reporting of python syntax errors

This commit is contained in:
milek7
2019-09-18 19:18:53 +02:00
parent c44c570509
commit a8b614cf6f
2 changed files with 5 additions and 3 deletions

View File

@@ -303,6 +303,9 @@ if (WIN32)
target_link_libraries(${PROJECT_NAME} ws2_32) target_link_libraries(${PROJECT_NAME} ws2_32)
endif() 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_CXX_PREFIX_HEADER_INIT "stdafx.h")
set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
cotire(${PROJECT_NAME}) cotire(${PROJECT_NAME})

View File

@@ -383,6 +383,7 @@ void python_taskqueue::run( GLFWwindow *Context, rendertask_sequence &Tasks, upl
std::lock_guard<std::mutex> lock(Upload_Tasks.mutex); std::lock_guard<std::mutex> lock(Upload_Tasks.mutex);
Upload_Tasks.data.push_back(task); Upload_Tasks.data.push_back(task);
} }
if( PyErr_Occurred() != nullptr )
error(); error();
} }
// clear the thread state // clear the thread state
@@ -415,8 +416,6 @@ void python_taskqueue::update()
void void
python_taskqueue::error() { python_taskqueue::error() {
if( PyErr_Occurred() == nullptr ) { return; }
if( m_stderr != nullptr ) { if( m_stderr != nullptr ) {
// std err pythona jest buforowane // std err pythona jest buforowane
PyErr_Print(); PyErr_Print();