MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / LoadError

Method LoadError

src/Display/Menu.cpp:207–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207void Menu::LoadError(const char *_ecv_array msg, unsigned int line) noexcept
208{
209 // Remove selectable items that may obscure view of the error message
210 ResetCache();
211
212 lcd.ClearAll();
213 lcd.SetFont(0);
214 lcd.printf("Error loading menu\nFile: %s", (numNestedMenus > 0) ? filenames[numNestedMenus - 1].c_str() : "(none)");
215 if (line != 0)
216 {
217 lcd.printf("\nLine %u", line);
218 if (errorColumn != 0)
219 {
220 lcd.printf(" column %u", errorColumn);
221 }
222 }
223 lcd.printf("\n%s", msg);
224
225 lastActionTime = millis();
226 timeoutValue = ErrorTimeout;
227 displayingErrorMessage = true;
228}
229
230// Parse a line in a menu layout file returning any error message, or nullptr if there was no error.
231// Leading whitespace has already been skipped.

Callers

nothing calls this directly

Calls 2

SetFontMethod · 0.80
printfMethod · 0.45

Tested by

no test coverage detected