I want to use https://github.com/eidheim/Simple-Web-Server as base for my server program. It is nice and mostly works, but when there is no file to load at asked address, it generates an exception and fails to catch it properly, so it crashes.
way to reproduce:
- compile http_example
- run program
- enter 127.0.0.1:8080/badfile.bad
- server crashes and says it has an exception
is there easy way to fix it?
I managed it but in nasty way.
just got rid of exceptions and get some "if"s