Sha256: fa4212003732158f4f16fe3789db9adef530aa4ff2ecfd4b0f0180def6effffa

Contents?: true

Size: 790 Bytes

Versions: 1

Compression:

Stored size: 790 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/errors.rb