mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Weird segfault when inspecting value type is back.
Working around with a crude rescue block.
This commit is contained in:
parent
28ae03d56f
commit
bbaa8816b8
1 changed files with 6 additions and 1 deletions
|
@ -292,7 +292,12 @@ module Spectator
|
|||
nil
|
||||
{% else %}
|
||||
# The stubbed value was something else entirely and cannot be cast to the return type.
|
||||
raise TypeCastError.new("#{_spectator_stubbed_name} received message #{ {{call}} } and is attempting to return a `#{%value.class}`, but returned type must be `#{ {{type}} }`.")
|
||||
%type = begin
|
||||
%value.class.to_s
|
||||
rescue
|
||||
"<Unknown>"
|
||||
end
|
||||
raise TypeCastError.new("#{_spectator_stubbed_name} received message #{ {{call}} } and is attempting to return a `#{%type}`, but returned type must be `#{ {{type}} }`.")
|
||||
{% end %}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue