Function try_handle

Source
pub fn try_handle<E, F>(func: F)
where E: Debug, F: FnOnce(Request) -> Result<Response, E>,
Expand description

Call a function as a CGI programme.

Same as handle, but takes a function that returns a Result, and in case of error, it writes the error to stderr, and returns an empty 500 response.