Commit fa340595746ba18fae3c6422ff4c9ea4af8e3023
1 parent
ae1a3148
Exists in
spb-stable
and in
3 other branches
Default message for SatelliteNotExistError
Showing
1 changed file
with
8 additions
and
8 deletions
Show diff stats
lib/gitlab/satellite/satellite.rb
1 | 1 | module Gitlab |
2 | - class SatelliteNotExistError < StandardError; end | |
2 | + class SatelliteNotExistError < StandardError | |
3 | + def initialize(msg = "Satellite doesn't exist") | |
4 | + super | |
5 | + end | |
6 | + end | |
3 | 7 | |
4 | 8 | module Satellite |
5 | 9 | class Satellite |
... | ... | @@ -17,12 +21,8 @@ module Gitlab |
17 | 21 | Gitlab::Satellite::Logger.error(message) |
18 | 22 | end |
19 | 23 | |
20 | - def raise_no_satellite | |
21 | - raise SatelliteNotExistError.new("Satellite doesn't exist") | |
22 | - end | |
23 | - | |
24 | 24 | def clear_and_update! |
25 | - raise_no_satellite unless exists? | |
25 | + raise SatelliteNotExistError unless exists? | |
26 | 26 | |
27 | 27 | File.exists? path |
28 | 28 | @repo = nil |
... | ... | @@ -55,7 +55,7 @@ module Gitlab |
55 | 55 | # * Changes the current directory to the satellite's working dir |
56 | 56 | # * Yields |
57 | 57 | def lock |
58 | - raise_no_satellite unless exists? | |
58 | + raise SatelliteNotExistError unless exists? | |
59 | 59 | |
60 | 60 | File.open(lock_file, "w+") do |f| |
61 | 61 | begin |
... | ... | @@ -77,7 +77,7 @@ module Gitlab |
77 | 77 | end |
78 | 78 | |
79 | 79 | def repo |
80 | - raise_no_satellite unless exists? | |
80 | + raise SatelliteNotExistError unless exists? | |
81 | 81 | |
82 | 82 | @repo ||= Grit::Repo.new(path) |
83 | 83 | end | ... | ... |