loudapet / 42webserv

This project is about writing one's own HTTP server
2 stars 0 forks source link

Handle std::bad_alloc #14

Open loudapet opened 1 month ago

loudapet commented 1 month ago

We should aim to catch std::bad_alloc specifically in a big try-catch block in order to prevent the server from crashing when it runs out of memory (and pray that it doesn't run out of stack)

loudapet commented 2 weeks ago

This will end up being 500 Internal Server Error in case it happens - not sure how we're gonna proceed with informing the client in such case though