Making a Web Application Robust
This lesson shows how to make an application robust by making it able to withstand a minor panic.
We'll cover the following...
When a handler function in a web application panics our web server simply terminates. This is not good: a web server must be a robust application, able to withstand what perhaps is a temporary problem.
A first idea could be to use defer/recover
in every handler-function, but this would lead to much duplication of code. Applying the error-handling scheme with closures is a much more elegant solution. Here, we show this mechanism applied ...