Method: Weechat::Utilities.safe_call

Defined in:
lib/weechat/utilities.rb

.safe_callObject



13
14
15
16
17
18
19
20
21
# File 'lib/weechat/utilities.rb', line 13

def self.safe_call
  begin
    ret = yield
  rescue => e
    format_exception(e)
    return Weechat::WEECHAT_RC_ERROR
  end
  ret
end