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:



6
7
8
# File 'lib/ftpd/error.rb', line 6

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

#sequence_errorObject



14
15
16
# File 'lib/ftpd/error.rb', line 14

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

#syntax_errorObject



18
19
20
# File 'lib/ftpd/error.rb', line 18

def syntax_error
  error "Syntax error", 501
end

#unimplemented_errorObject



10
11
12
# File 'lib/ftpd/error.rb', line 10

def unimplemented_error
  error "Command not implemented", 502
end