vendor/bundle/ruby/1.8/gems/Ruby-MemCache-0.0.1/lib/memcache.rb
### Handle error messages defined in the memcached protocol. The +buffer+
### argument will be parsed for the error type, and, if appropriate, the
### error message. The +server+ argument is only used in the case of
### +SERVER_ERROR+, in which case the raised exception will contain that
### object. The +depth+ argument is used to specify the call depth from
### which the exception's stacktrace should be gathered.
Handle error messages defined in the memcached protocol. The +buffer+
argument will be parsed for the error type, and, if appropriate, the
error message. The +server+ argument is only used in the case of
+SERVER_ERROR+, in which case the raised exception will contain that
object. The +depth+ argument is used to specify the call depth from
which the exception's stacktrace should be gathered.
Handle error messages defined in the memcached protocol . The + buffer + argument will be parsed for the error type and if appropriate the error message . The + server + argument is only used in the case of + SERVER_ERROR + in which case the raised exception will contain that object . The + depth + argument is used to specify the call depth from which the exception ' s stacktrace should be gathered .
def handle_protocol_error( buffer, server, depth=4 )
		case buffer
		when CLIENT_ERROR
			raise ClientError, $1, caller(depth)
		when SERVER_ERROR
			raise ServerError::new( server ), $1, caller(depth)
		else
			raise InternalError, "Unknown internal error", caller(depth)
		end
	end
def handle_protocol_error ( buffer , server , depth = 4 ) case buffer when CLIENT_ERROR raise ClientError , $1 , caller ( depth ) when SERVER_ERROR raise ServerError :: new ( server ) , $1 , caller ( depth ) else raise InternalError , "Unknown internal error" , caller ( depth ) end end
Handle error messages defined in the memcached protocol.
Handle error messages defined in the memcached protocol .
buffer
server
depth