Exception: Gitlab::Fp::UnmatchedResultError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Gitlab::Fp::UnmatchedResultError
- Defined in:
- lib/gitlab/fp/unmatched_result_error.rb
Instance Method Summary collapse
- #initialize(result:) ⇒ void constructor
Constructor Details
#initialize(result:) ⇒ void
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 |