Add @raise annotation to gem's method
已回答
Hi!
How do I tell to Rubymine that some external method throws an error?
Say I have such code:
user = User.find(id)
unless user
invalid!() # it's a method from Tzu gem that raises an error
end
puts user.address # <-- here Rubymine says that user can be nil
# But in the reality it cannot as there would be an error earlier.
请先登录再写评论。
Hello,
at the moment it's not possible but it'd be great if you could submit a corresponding feature request on our tracker:
https://youtrack.jetbrains.com/issues/RUBY
Olga, thank you for the reply, the issue is https://youtrack.jetbrains.com/issue/RUBY-23332