Module: Ftpd::Error

Included in:
CommandHandler, CommandLoop, CommandSequenceChecker, Session
Defined in:
lib/ftpd/error.rb

Instance Method Summary collapse

Instance Method Details

#error(message, code) ⇒ Object

Raises:


4
5
6
# File 'lib/ftpd/error.rb', line 4

def error(message, code)
  raise FtpServerError.new(message, code)
end

#sequence_errorObject


12
13
14
# File 'lib/ftpd/error.rb', line 12

def sequence_error
  error "Bad sequence of commands", 503
end

#syntax_errorObject


16
17
18
# File 'lib/ftpd/error.rb', line 16

def syntax_error
  error "Syntax error", 501
end

#unimplemented_errorObject


8
9
10
# File 'lib/ftpd/error.rb', line 8

def unimplemented_error
  error "Command not implemented", 502
end