Exception: Gitlab::Fp::UnmatchedResultError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/gitlab/fp/unmatched_result_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(result:) ⇒ void

Parameters:



8
9
10
11
12
13
# File 'lib/gitlab/fp/unmatched_result_error.rb', line 8

def initialize(result:)
  msg = "Failed to pattern match #{result.ok? ? "'ok'" : "'err'"} Result " \
    "containing message of type: #{(result.ok? ? result.unwrap : result.unwrap_err).class.name}"

  super(msg)
end