mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-08-03 16:37:48 +00:00
17 lines
433 B
Ruby
17 lines
433 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module Fp
|
|
class UnmatchedResultError < RuntimeError
|
|
# @param [Gitlab::Fp::Result] result
|
|
# @return [void]
|
|
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
|
|
end
|
|
end
|
|
end
|