Skip to content

Commit

Permalink
Improved shell_example for binary loading error.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Mar 5, 2024
1 parent 33aaefa commit 7aace55
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ <h2><a class="anchor" id="autotoc_md6"></a>
<div class="line"> <span class="comment">// Attempt to load specified file into Rishka virtual machine</span></div>
<div class="line"> <span class="keywordflow">if</span>(!rishka_vm_loadfile(&amp;vm, input.c_str())) {</div>
<div class="line"> <span class="comment">// If loading file fails, print error message and return</span></div>
<div class="line"> Serial.println(<span class="stringliteral">&quot;Failed to load specified file: &quot;</span> + input);</div>
<div class="line"> Serial.print(<span class="stringliteral">&quot;Failed to load specified file: &quot;</span> + input);</div>
<div class="line"> Serial.print(<span class="stringliteral">&quot;&gt; &quot;</span>);</div>
<div class="line"> <span class="keywordflow">return</span>;</div>
<div class="line"> }</div>
<div class="line"> </div>
Expand Down
3 changes: 2 additions & 1 deletion examples/shell_example/shell_example.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion misc/main_page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7aace55

Please sign in to comment.