ArthurSonzogni / Diagon

Interactive ASCII art diagram generators. :star2:
https://arthursonzogni.com/Diagon/
MIT License
1.47k stars 56 forks source link

Crash with invalid input #36

Closed ppiecuch closed 2 years ago

ppiecuch commented 2 years ago
pawelp@pawelp-mb-13 fltk % echo "1/2=" | ../../../Diagon/build-osx/diagon Math
line 1:4 mismatched input '\n' expecting {STRING, '(', '{', '[', '+', '-', VARIABLE}
zsh: done                echo "1/2=" |
zsh: segmentation fault  ../../../Diagon/build-osx/diagon Math

Is there a way I could managed invalid input? I am writing gui plugin and I am not able to catch these kind of crashes.

Regards Pawel

ArthurSonzogni commented 2 years ago

Not crashing is a much reasonable way to handle this. I agree. This would require some code change.