Commit Graph

30 Commits

Author SHA1 Message Date
Roger Meier
0193149842 THRIFT-1801 Sync up TApplicationException codes across languages and thrift implementations
Patch: Andrew Cox
2012-12-22 21:31:03 +01:00
Roger Meier
345ecc739a THRIFT-690 add new ApplicationExceptions (INTERNAL_ERROR, PROTOCOL_ERROR) to the following languages: as3, c_glib, cocoa, cpp, erl, hs, js, nodejs, ocaml, perl, py, rb
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1153412 13f79535-47bb-0310-9956-ffa450edef68
2011-08-03 09:49:27 +00:00
David Reiss
f4494ee3a9 erlang: Un-revert r988722
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991003 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:06:03 +00:00
David Reiss
cf7f3973bb erlang: Rename _impl headers to _behaviour
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990998 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:55 +00:00
David Reiss
639e1cfe2b erlang: Refactor thrift_transport and all transport implementations
Note that the buffering transports still use a separate process to
maintain their state.  This change just changes them to use a
"return-the-new-version"-style API.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990989 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:43 +00:00
David Reiss
63f6126e97 erlang: Refactor the binary protocol
At this point, everything passes dialyzer except for the processor,
and the client works.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990983 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:34 +00:00
David Reiss
480d5ab62b erlang: Separate out thrift_protocol:read_specific
By giving a different name to the function that reads from the
protocol implementation, we can get a slightly more enforcible spec.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990977 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:26 +00:00
David Reiss
1cb979b3d0 erlang: Add a more detailed spec for thrift_protocol:read
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990976 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:25 +00:00
David Reiss
48b8124e32 erlang: Separate out thrift_binary_protocol:read_data
By giving a different name to the function that reads bytes from the
transport, we can get a slightly more detailed spec.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990975 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:23 +00:00
David Reiss
ee93398ccc erlang: Add some more detailed specs for protocol implementations
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990974 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:22 +00:00
David Reiss
9b7fbe3743 erlang: Add some initial specs for thrift_transport and its implementations
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990973 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:20 +00:00
David Reiss
5e6637b0ff erlang: Add some initial specs to thrift_client and thrift_protocol
Also add a special header for use in thrift_protocol implementations
that gives specs for the callbacks.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990972 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:18 +00:00
David Reiss
3e81fff832 erlang: Be a little more formal
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990966 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:11 +00:00
David Reiss
f32d0fb900 Rollback a few recent Erlang changes to fix blame data
My combined patch for THRIFT-599 was committed, but it is preferable
commit the individual patches to preserve the more detailed log and
blame data.  I'll recommit r987018 as a sequence of patches and r988722
as its own rev.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990957 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:00 +00:00
David Reiss
82c73194df THRIFT-866. erlang: Make specs compatible with Erlang R12
term() wasn't initially supported as an alias for any().

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@988722 13f79535-47bb-0310-9956-ffa450edef68
2010-08-24 20:52:56 +00:00
Bryan Duxbury
d3879f80c6 THRIFT-599. erl: Don't use unnecessary processes in the Erlang transports and clients
The only user-visible changes are to the client. Every thrift call now returns {NewClient, Result} instead of just Result.

Patch: David Reiss (assist to Anthony Molinaro)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@987018 13f79535-47bb-0310-9956-ffa450edef68
2010-08-19 05:06:02 +00:00
David Reiss
deda141392 THRIFT-388. Create a "ONEWAY" message type that is an alias for "CALL"
Pave the way for a new message type for oneway function calls.
For now, just define the constant in all languages and make
server implementations treat it the same way as a normal call.
Only C++ and Erlang currently check the message type (on the
server side).

There is a little bit of redundancy in the Erlang code, but
the alternative is a bit gross, and this split-up will be
necessary eventually when we start handling one-way calls
differently.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761389 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 19:22:31 +00:00
David Reiss
ea2cba8ba8 THRIFT-387. Add license headers to a bunch of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760189 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:35:00 +00:00
David Reiss
9f2a5d7799 Rename "alterl" to "erl".
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666481 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:15:45 +00:00
David Reiss
f2e66c1cb7 Remove all of the old Erlang stuff in preparation for renaming alterl.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666480 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:14:38 +00:00
David Reiss
0c90f6f8af Thrift: Whitespace cleanup.
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.

Reviewed By: mcslee

Test Plan: git diff -b

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 22:18:40 +00:00
Christopher Piro
de11d85211 [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
2007-11-18 02:10:20 +00:00
Christopher Piro
53b6ef670c [thrift] whole ball of whitespace normalizations in Erlang
Summary: ill-formatted comments, trailing whitespace, and (gasp) tabs: all pwned.  better now than later.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665339 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:28 +00:00
Christopher Piro
6c46f1a8c9 [thrift] gut Erlang Thrift configuration; start using get_env
Summary: I patterned some config stuff after iserve, but Erlang's built-in stuff is better

Reviewed By: gopher

Test Plan: works with recent ch server

Revert Plan: ok

Other Notes: default config given in thrift.app


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665307 13f79535-47bb-0310-9956-ffa450edef68
2007-10-23 09:47:15 +00:00
Christopher Piro
3b63fe4d3c [thrift] clean up error logging in Erlang
Summary: pushed all formatting out of thrift_error_logger.erl, reenable crash logs, standardize

Reviewed By: eletuchy

Test Plan: works with latest ch server


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665305 13f79535-47bb-0310-9956-ffa450edef68
2007-10-19 21:34:31 +00:00
Christopher Piro
efd5eec211 [thrift] Erlang Thrift changes, take 3
Summary: svn ci missed a bunch of paths ... blew away the whole thing and copied from the git repo.  this is getting ridiculous.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665285 13f79535-47bb-0310-9956-ffa450edef68
2007-10-02 01:33:37 +00:00
Christopher Piro
68940295e1 [thrift] otpification and sane configuration for Erlang Thrift
Summary: a small victory in the neverending quest of OTPifying this binding -- search for config files in ./conf/ (relative to the cwd of the emulator).  for example, when you start the channel server, ./conf/{channel,thrift}.conf should exist.  better than having to recompile to change a configuration ... reconfig should take care of that in running code.

Test Plan: works with channel server


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665284 13f79535-47bb-0310-9956-ffa450edef68
2007-10-02 00:35:12 +00:00
Christopher Piro
42fe4b9a3e [thrift] revert 61883
Summary: i suck at git/svn ... commited not enough and with no commitlog

Notes: YOU'RE DOING IT WRONG


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665283 13f79535-47bb-0310-9956-ffa450edef68
2007-10-02 00:24:07 +00:00
Christopher Piro
c7fd7639b7 Merge branch 'otp'
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665282 13f79535-47bb-0310-9956-ffa450edef68
2007-10-02 00:05:04 +00:00
Christopher Piro
93a0664aff [thrift] spruce up Erlang binding for tonight's release
Summary:
 * got rid of most of the otp_base jonx ... save that for a future release unfortunately
 * cleaned up the tutorial server, added -erl to tutorial.thrift's shebang
 * made better README and TODO

Test Plan: checked out a copy, read my directions, built and ran the tutorial, and pretended that it didn't blow


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665273 13f79535-47bb-0310-9956-ffa450edef68
2007-09-18 06:23:33 +00:00