Summary: three related changes:
* for numeric types in tBinaryProtocol call effectful_write with binary(), not [char()]
* tBinaryProtocol:writeString now takes either [char()], iolist(), or binary() ... now you can use any of the three where a Thrift string is required
* tBufferedTransport now buffers by building an iolist() rather than Buffer++Data. zomg.
Reviewed By: eletuchy
Test Plan: everything seems to work as usual, and binary() works as expected
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665447 13f79535-47bb-0310-9956-ffa450edef68
Summary: this gets rid of a lot of messy useless output every time the error logger prints something
Reviewed By: eletuchy
Test Plan: works as expected
Revert Plan: ok
Other Notes: contributed by Todd Lipcon (todd@amiestreet.com)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665422 13f79535-47bb-0310-9956-ffa450edef68
Summary: there's a new format for errors in R12B-0, so don't echo a crash report if it matches the new one
Reviewed By: eletuchy
Test Plan: completely unnecessary
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665400 13f79535-47bb-0310-9956-ffa450edef68
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
Summary:
* no ?INFO for every oop:call ... way too expensive
* unfactor symbol/1 ... it was that way for a reason apparently
* upped crash report depth to 3
Reviewed By: eletuchy
Test Plan: /much/ less CPU eaten by logging
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665343 13f79535-47bb-0310-9956-ffa450edef68
Summary: crash reports aren't too important so don't be so verbose -- all the pertinent info shows up elsewhere anyway. refactor while we're at it.
Reviewed By: eletuchy
Test Plan: ok
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665342 13f79535-47bb-0310-9956-ffa450edef68
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
Summary: make uniform across all tTransports. god i want `effectful' to go away dead. soon.
Reviewed By: eletuchy
Test Plan: ok
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665338 13f79535-47bb-0310-9956-ffa450edef68
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
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
Summary: more robust logic theres
Reviewed By: eletuchy
Test Plan: ok
Revert Plan: ok
Other Notes: the precommit hooks should forbid out-of-towners from being cited as reviewers
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665301 13f79535-47bb-0310-9956-ffa450edef68
Summary: oop.erl used to assume that an undef or function_clause meant a method wasn't defined, but sometimes a method does exist and an undef happens while it's executing.
Case in point, getTransport in tBufferedTransportFactory totally didn't work and instead of exiting, oop.erl fell back silently to tTransportFactory, so everywhere I thought I was talking to tBufferedTransport, I was talking directly to the tSocket. borkborkbork.
Blame: all me baby
Reviewed By: eletuchy
Test Plan: channel server works
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665299 13f79535-47bb-0310-9956-ffa450edef68
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
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
Summary: all tTEs were being filtered from the logs; now just tTEs that come from connections closing are suppressed
Test Plan: logs my bug in channel server :)
Notes: adds logic to thrift_logger, not removes (bad news bears)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665199 13f79535-47bb-0310-9956-ffa450edef68
Summary: generate an error message at the server ... before only the client got the error
Reviewed By: iproctor
Test Plan: tutorial, channel server
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665187 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* custom, extensible error logger -- show only relevant stuff
* clean up of errors in developer-supplied handler module
now gives sane error messages and doesn't crash whole server
(introduces tApplicationException_HANDLER_ERROR)
* more precise catch in tErlProcessor (exits gracefully only if
transport closes)
Reviewed By: iproctor
Test Plan: tutorial works
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665186 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* const/enum namespacing
* better formatting, less debugging comments in both source and gen-erl/
Notes:
* in preparation for iproctor's whiz-bang map/list/set support
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665169 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* shim to use object-oriented code as gen_servers
* high(er) performance Erlang-style server and transport
* sane packaging based on otp-base, i.e. Makefiles and real structure
Test Plan: tutorial server offers the same (subset of) functionality as previous version
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665164 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* missing {list,map,set}s, inheritance is spotty
* loose source code, plus everything is one process (application / gen_server behavior is forthcoming)
* codegen is a mess, need t_fp_generator
Test Plan:
* codegen invoked without -erl generates identical code for test/
* calculatorHandler plus 'thrift -erl -r tutorial.thrift' more or less works
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665146 13f79535-47bb-0310-9956-ffa450edef68