Elixir is slow to compile functions with many heads, which is how we generate
enums in this library. It's faster to compile an equivalent case statement
inside a single function head. I observed that it reduced the time to compile
an enum with about 2500 values from 24s to 3s.
wrap_with_try_catch/4 wraps a function handler body with a try/1.
Our previous approach used `rescue` clauses for exception types defined
for this function in the schema. When no exception types are defined,
this resulted in us passing [] (empty list) into the macro as the
`rescue` argument. Elixir 1.10 doesn't like that:
expected -> clauses for :rescue in "try"
This revised approach moves exception type handling into the existing
`catch` list (and does away with `rescue`), merging them with our
existing `catch` clause that is common to all server functions. This
guarantees that we always have at least one clause to expand in the
macro.
This includes the `@moduledoc false` changes we recently made to the
Thrift generators.
The rest of the formatting changes come from regenerating these files
under Elixir 1.7.