THRIFT-2418 Go handler function panics on internal error
authorJens Geyer <jensg@apache.org>
Thu, 20 Mar 2014 21:03:48 +0000 (23:03 +0200)
committerJens Geyer <jensg@apache.org>
Thu, 20 Mar 2014 21:03:48 +0000 (23:03 +0200)
Patch: Frank Schroeder

compiler/cpp/src/generate/t_go_generator.cc

index dadef5c..168ca88 100644 (file)
@@ -2369,7 +2369,7 @@ void t_go_generator::generate_process_function(t_service* tservice,
     }
 
     f_service_ <<
-               indent() << "  x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, \"Internal error processing " << escape_string(tfunction->get_name()) << ": \" + err.Error())" << endl <<
+               indent() << "  x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, \"Internal error processing " << escape_string(tfunction->get_name()) << ": \" + err2.Error())" << endl <<
                indent() << "  oprot.WriteMessageBegin(\"" << escape_string(tfunction->get_name()) << "\", thrift.EXCEPTION, seqId)" << endl <<
                indent() << "  x.Write(oprot)" << endl <<
                indent() << "  oprot.WriteMessageEnd()" << endl <<