MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / setScriptError

Method setScriptError

src/visualizer/gui/panels/python_scripts_panel.cpp:63–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 void PythonScriptManagerState::setScriptError(size_t index, const std::string& error) {
64 std::uint64_t generation = 0;
65 {
66 std::lock_guard lock(mutex_);
67 if (index < scripts_.size()) {
68 const bool has_error = !error.empty();
69 if (scripts_[index].has_error != has_error || scripts_[index].error_message != error) {
70 scripts_[index].has_error = has_error;
71 scripts_[index].error_message = error;
72 generation = ++generation_;
73 }
74 }
75 }
76 publishScriptsGeneration(generation);
77 }
78
79 void PythonScriptManagerState::clearErrors() {
80 std::uint64_t generation = 0;

Callers 1

register_scriptsFunction · 0.80

Calls 3

publishScriptsGenerationFunction · 0.85
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected