[thrift] gut Erlang exception handling
authorChristopher Piro <cpiro@apache.org>
Sun, 18 Nov 2007 02:10:20 +0000 (02:10 +0000)
committerChristopher Piro <cpiro@apache.org>
Sun, 18 Nov 2007 02:10:20 +0000 (02:10 +0000)
commitde11d852113dcb2284c54ab47333e6f602320fc9
treef78771d95182132100083724aecee9c52ddc7611
parent09f69e052452e973949bc143d0f34c28c51ff15e
[thrift] gut Erlang exception handling

Summary: * move type field to tException from subclasses
          * add backtrace to tException
          * add oop:is_a
          * on exit, wrap exceptions in {thrift_exception, E} ... otherwise can't distinguish e.g. exit:{{tBinProtException, {tException, ...}}, Stack} vs. exit:{tBinProtException, {tException, ...} -- I hate erlang
          * all throws/exits to tException:throw which does the wrapping described above

Reviewed By: eletuchy

Test Plan: been using this code on my live server ^_^

Revert: OK

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665350 13f79535-47bb-0310-9956-ffa450edef68
22 files changed:
compiler/cpp/src/generate/t_erl_generator.cc
lib/erl/include/oop.hrl
lib/erl/include/protocol/tProtocolException.hrl
lib/erl/include/tApplicationException.hrl
lib/erl/include/tException.hrl
lib/erl/include/thrift_constants.hrl
lib/erl/include/thrift_macros.hrl
lib/erl/include/transport/tTransportException.hrl
lib/erl/src/oop.erl
lib/erl/src/protocol/tBinaryProtocol.erl
lib/erl/src/protocol/tProtocolException.erl
lib/erl/src/server/tErlServer.erl
lib/erl/src/tApplicationException.erl
lib/erl/src/tErlProcessor.erl
lib/erl/src/tException.erl
lib/erl/src/thrift_logger.erl
lib/erl/src/thrift_oop_server.erl
lib/erl/src/thrift_sup.erl
lib/erl/src/thrift_utils.erl
lib/erl/src/transport/tErlAcceptor.erl
lib/erl/src/transport/tSocket.erl
lib/erl/src/transport/tTransportException.erl