gitlab-org--gitlab-foss/lib/gitlab/import_export/error.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
558 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module ImportExport
class Error < StandardError
def self.permission_error(user, object)
self.new(
"User with ID: %s does not have required permissions for %s: %s with ID: %s" %
[user.id, object.class.name, object.name, object.id]
)
end
def self.unsupported_object_type_error
self.new('Unknown object type')
end
def self.file_compression_error
self.new('File compression/decompression failed')
end
end
end
2016-05-12 05:29:06 -04:00
end