Exception: Gitlab::Git::BaseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/gitlab/git/base_error.rb

Constant Summary collapse

DEBUG_ERROR_STRING_REGEX =
/(.*?) debug_error_string:.*$/m.freeze

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ BaseError

Returns a new instance of BaseError.


8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gitlab/git/base_error.rb', line 8

def initialize(msg = nil)
  if msg
    raw_message = msg.to_s
    match = DEBUG_ERROR_STRING_REGEX.match(raw_message)
    raw_message = match[1] if match

    super(raw_message)
  else
    super
  end
end