diff --git a/lib/ruby_lsp/test_helper.rb b/lib/ruby_lsp/test_helper.rb index 0fee56218..016dccb25 100644 --- a/lib/ruby_lsp/test_helper.rb +++ b/lib/ruby_lsp/test_helper.rb @@ -5,6 +5,8 @@ module RubyLsp module TestHelper + class TestError < StandardError; end + extend T::Sig sig do @@ -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