Commit 935de618 authored by James Allenby's avatar James Allenby
Browse files

Added default 404 page

parent 286040fd
...@@ -74,9 +74,14 @@ void JAMP::Server::All(std::string uri, HTTPCallback callback) ...@@ -74,9 +74,14 @@ void JAMP::Server::All(std::string uri, HTTPCallback callback)
} }
catch(std::exception e) catch(std::exception e)
{ {
response.SetResponseCode(JAMP::Code::HTTP_500); response.SetResponseCode(JAMP::Code::HTTP_404);
std::string e_msg("Exception: "); std::string e_msg("<html>"
e_msg += e.what(); "<body>"
"<h1>404 - Not Found</h1>"
"<hr>"
"<p>Please try another resource</p>"
"</body>"
"</html>");
response.Write(e_msg); response.Write(e_msg);
response.Close(); response.Close();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment