[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
diff --git a/lib/erl/include/oop.hrl b/lib/erl/include/oop.hrl
index 84d81e1..66d1a0c 100644
--- a/lib/erl/include/oop.hrl
+++ b/lib/erl/include/oop.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
@@ -16,10 +16,10 @@
 %%% convenience for implementing inspect/1
 %%% e.g. -> "foo=5"
 -define(FORMAT_ATTR(Attr),
-	io_lib:write_atom(Attr) ++ "=" ++ io_lib:print(?ATTR(Attr))
+        io_lib:write_atom(Attr) ++ "=" ++ io_lib:print(?ATTR(Attr))
 ).
 
--define(ATTR_DUMMY, 
-	attr(dummy, dummy, dummy, dummy) ->
-	       throw(dummy_attr_used)
+-define(ATTR_DUMMY,
+        attr(dummy, dummy, dummy, dummy) ->
+               exit(dummy_attr_used)
 ).