Files
metasploit-gs/lib/msf/core/exceptions.rb
T
Matt Miller 8a192dae88 moved shit around again
git-svn-id: file:///home/svn/incoming/trunk@2498 4d416f70-5f16-0410-b530-b9f4589650da
2005-05-21 17:57:00 +00:00

55 lines
915 B
Ruby

module Msf
class EncodingException < RuntimeError
end
###
#
# NoKeyException
# --------------
#
# Thrown when an encoder fails to find a viable encoding key.
#
###
class NoKeyException < EncodingException
end
###
#
# BadcharException
# ----------------
#
# Thrown when an encoder fails to encode a buffer due to a bad character.
#
###
class BadcharException < EncodingException
def initialize(buf, index, stub_size, char)
@buf = buf
@index = index
@stub_size = stub_size
@char = char
end
attr_reader :buf, :index, :stub_size, :char
end
###
#
# MissingOptionError
# ------------------
#
# This exception is thrown when one or more options failed
# to pass data store validation. The list of option names
# can be obtained through the options attribute.
#
###
class OptionValidateError < ArgumentError
def initialize(options)
@options = options
end
attr_reader :options
end
end