Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/import_export/error.rb')
-rw-r--r--lib/gitlab/import_export/error.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/gitlab/import_export/error.rb b/lib/gitlab/import_export/error.rb
index f11b7a0a298..4af6b03fe94 100644
--- a/lib/gitlab/import_export/error.rb
+++ b/lib/gitlab/import_export/error.rb
@@ -3,12 +3,20 @@
module Gitlab
module ImportExport
class Error < StandardError
- def self.permission_error(user, importable)
+ 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, importable.class.name, importable.name, importable.id]
+ [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 failed')
+ end
end
end
end