Skip to content

Commit

Permalink
Use TestError class
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Dec 18, 2024
1 parent d104051 commit 35a19be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ruby_lsp/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

module RubyLsp
module TestHelper
class TestError < StandardError; end

extend T::Sig

sig do
Expand Down Expand Up @@ -59,7 +61,7 @@ def pop_result(server)
result = server.pop_response until result.is_a?(RubyLsp::Result) || result.is_a?(RubyLsp::Error)

if result.is_a?(RubyLsp::Error)
raise "Failed to execute request #{result.message}"
raise TestError, "Failed to execute request #{result.message}"
else
result
end
Expand Down

0 comments on commit 35a19be

Please sign in to comment.