Sha256: 9f6986ab3a8b3adbd8a922a51924761eb37f45a8864a87625e9bcbb3893f378b

Contents?: true

Size: 786 Bytes

Versions: 1

Compression:

Stored size: 786 Bytes

Contents

module CSI

  class Error < StandardError
  end

  # Raised when trying to find an invalid code - a code
  # that does not exist, or is not a String value e.g.
  #
  #   CSI::naics("1337")
  #   # => CSI::CodeInvalid
  #
  #   CSI::sic(1337)
  #   # => CSI::CodeInvalid
  #
  class CodeInvalid < Error
  end

  # Raised when trying to find an invalid type e.g.
  #
  #   CSI::naics("FBI")
  #   # => CSI::TypeInvalid
  #
  #   CSI::sic("CIA")
  #   # => CSI::TypeInvalid
  #
  class TypeInvalid < Error
  end

  # Raised when trying to find an invalid code/type combination
  #
  #   CSI::Record.new('NAICS', "1337")
  #   # => CSI::ClassificationInvalid
  #
  #   CSI::Record.new('SIC', "1337")
  #   # => CSI::ClassificationInvalid
  #
  class ClassificationInvalid < Error
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
csi-0.3.3 lib/csi/errors.rb