Sha256: 8831de8c9af429acf5519dd6dfc33c6fffedffff42c4dc55b7a235f0522c8a2e

Contents?: true

Size: 903 Bytes

Versions: 12

Compression:

Stored size: 903 Bytes

Contents

module TableImporter

  class ImportError < StandardError;
  end

  class EmptyFileImportError < ImportError
    def initialize(message = "The file you uploaded has no valid content to import or the content cannot be read. If there is content in your file please try copying and pasting it in instead.")
      super(message)
  	end
  end

  class EmptyStringImportError < ImportError
    def initialize(message = "The data you pasted in has no valid content to import or it cannot be read.")
      super(message)
    end
  end

  class IncorrectFileError < ImportError
    def initialize(message = "Sorry, you didn't upload the type of file you said you did.")
      super(message)
    end
  end

  class HeaderMismatchError < ImportError
    def initialize(message = "Sorry, we couldn't process your file. Did you correctly check whether your file has headers?")
      super(message)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
table_importer-0.2.5 lib/table_importer/exceptions.rb
table_importer-0.2.4 lib/table_importer/exceptions.rb
table_importer-0.2.3 lib/table_importer/exceptions.rb
table_importer-0.2.2 lib/table_importer/exceptions.rb
table_importer-0.2.1 lib/table_importer/exceptions.rb
table_importer-0.1.1 lib/table_importer/exceptions.rb
table_importer-0.1.0 lib/table_importer/exceptions.rb
table_importer-0.0.10 lib/table_importer/exceptions.rb
table_importer-0.0.9 lib/table_importer/exceptions.rb
table_importer-0.0.8 lib/table_importer/exceptions.rb
table_importer-0.0.7 lib/table_importer/exceptions.rb
table_importer-0.0.6 lib/table_importer/exceptions.rb