mirror of
https://github.com/onyx-and-iris/obsws-ruby.git
synced 2024-11-15 18:50:47 +00:00
move logger back into rescue block
This commit is contained in:
parent
123b9c55ca
commit
c97d14abe2
@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
obsws (0.5.5)
|
||||
obsws (0.5.6)
|
||||
waitutil (~> 0.2.1)
|
||||
websocket-driver (~> 0.7.5)
|
||||
|
||||
|
@ -43,11 +43,12 @@ module OBSWS
|
||||
timeout_sec: 3
|
||||
) { @response[:requestId] == uuid }
|
||||
unless @response[:requestStatus][:result]
|
||||
OBSWSRequestError.new(@response[:requestType], @response[:requestStatus][:code], @response[:requestStatus][:comment]) => e
|
||||
logger.error(["#{e.class.name}: #{e.message}", *e.backtrace].join("\n"))
|
||||
raise e
|
||||
raise OBSWSRequestError.new(@response[:requestType], @response[:requestStatus][:code], @response[:requestStatus][:comment])
|
||||
end
|
||||
@response[:responseData]
|
||||
rescue OBSWSRequestError => e
|
||||
logger.error(["#{e.class.name}: #{e.message}", *e.backtrace].join("\n"))
|
||||
raise
|
||||
rescue WaitUtil::TimeoutError => e
|
||||
logger.error(["#{e.class.name}: #{e.message}", *e.backtrace].join("\n"))
|
||||
raise OBSWSError.new([e.message, *e.backtrace].join("\n"))
|
||||
|
Loading…
Reference in New Issue
Block a user