git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668919
13f79535-47bb-0310-9956-
ffa450edef68
# Wraps the given methods to print a warning and call the real method
# Example:
# deprecate! :readAll => :read_all
+ #--
+ # Yeah, this is ugly, passing a string to module_eval, but unfortunately
+ # using a block removes the ability to pass blocks to the defined method
+ # and breaks spec
def deprecate!(methods)
return unless Thrift::DEPRECATION
methods.each_pair do |old, new|
module Thrift
class Exception < StandardError
def initialize(message)
- super(message)
+ super
@message = message
end
attr_reader :type
def initialize(type=UNKNOWN, message=nil)
- super(message)
+ super
@type = type
end