Skip to content

Commit

Permalink
Add file load error message
Browse files Browse the repository at this point in the history
  • Loading branch information
pcprince committed Aug 6, 2024
1 parent ec3cbd6 commit f62f2b0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3372,7 +3372,15 @@ fileButton.addEventListener('click', () => {

if (!drawing && !playing) {

loadFile();
try {

loadFile();

} catch (error) {

showErrorDisplay('File could not be opened.');

}

}

Expand Down

0 comments on commit f62f2b0

Please sign in to comment.