Change exception catching in generated Erlang to properly report function_clause and undef errors
Summary:
- The exception handler now uses erlang:get_stacktrace() and inspects that to determine whether
the undef or function_clause error was actually due to the handler not implementing the function
or whether it was deeper down.
- The exception handler also uses error_logger:error_msg to report any exceptions, including stacktrace.
- This makes debugging a lot easier.
Test Plan:
- I've been using this on one of our services and it works as expected