From 7aace55b838ba9a39ee6b6bcc8d5574b57ebfb39 Mon Sep 17 00:00:00 2001 From: nthnn Date: Tue, 5 Mar 2024 23:28:02 +0800 Subject: [PATCH] Improved shell_example for binary loading error. --- README.md | 3 ++- docs/index.html | 3 ++- examples/shell_example/shell_example.ino | 3 ++- misc/main_page.md | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5335268..f8e0a4a 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,8 @@ void loop() { // Attempt to load specified file into Rishka virtual machine if(!rishka_vm_loadfile(&vm, input.c_str())) { // If loading file fails, print error message and return - Serial.println("Failed to load specified file: " + input); + Serial.print("Failed to load specified file: " + input); + Serial.print("> "); return; } diff --git a/docs/index.html b/docs/index.html index e0db817..19741e1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -220,7 +220,8 @@

// Attempt to load specified file into Rishka virtual machine
if(!rishka_vm_loadfile(&vm, input.c_str())) {
// If loading file fails, print error message and return
-
Serial.println("Failed to load specified file: " + input);
+
Serial.print("Failed to load specified file: " + input);
+
Serial.print("> ");
return;
}
diff --git a/examples/shell_example/shell_example.ino b/examples/shell_example/shell_example.ino index 001888c..8c61d25 100644 --- a/examples/shell_example/shell_example.ino +++ b/examples/shell_example/shell_example.ino @@ -67,7 +67,8 @@ void loop() { // Attempt to load specified file into Rishka virtual machine if(!rishka_vm_loadfile(&vm, input.c_str())) { // If loading file fails, print error message and return - Serial.println("Failed to load specified file: " + input); + Serial.print("Failed to load specified file: " + input); + Serial.print("> "); return; } diff --git a/misc/main_page.md b/misc/main_page.md index cbc8cee..c78655a 100644 --- a/misc/main_page.md +++ b/misc/main_page.md @@ -161,7 +161,8 @@ void loop() { // Attempt to load specified file into Rishka virtual machine if(!rishka_vm_loadfile(&vm, input.c_str())) { // If loading file fails, print error message and return - Serial.println("Failed to load specified file: " + input); + Serial.print("Failed to load specified file: " + input); + Serial.print("> "); return; }