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
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
obsws (0.5.5)
|
obsws (0.5.6)
|
||||||
waitutil (~> 0.2.1)
|
waitutil (~> 0.2.1)
|
||||||
websocket-driver (~> 0.7.5)
|
websocket-driver (~> 0.7.5)
|
||||||
|
|
||||||
|
@ -43,11 +43,12 @@ module OBSWS
|
|||||||
timeout_sec: 3
|
timeout_sec: 3
|
||||||
) { @response[:requestId] == uuid }
|
) { @response[:requestId] == uuid }
|
||||||
unless @response[:requestStatus][:result]
|
unless @response[:requestStatus][:result]
|
||||||
OBSWSRequestError.new(@response[:requestType], @response[:requestStatus][:code], @response[:requestStatus][:comment]) => e
|
raise OBSWSRequestError.new(@response[:requestType], @response[:requestStatus][:code], @response[:requestStatus][:comment])
|
||||||
logger.error(["#{e.class.name}: #{e.message}", *e.backtrace].join("\n"))
|
|
||||||
raise e
|
|
||||||
end
|
end
|
||||||
@response[:responseData]
|
@response[:responseData]
|
||||||
|
rescue OBSWSRequestError => e
|
||||||
|
logger.error(["#{e.class.name}: #{e.message}", *e.backtrace].join("\n"))
|
||||||
|
raise
|
||||||
rescue WaitUtil::TimeoutError => e
|
rescue WaitUtil::TimeoutError => e
|
||||||
logger.error(["#{e.class.name}: #{e.message}", *e.backtrace].join("\n"))
|
logger.error(["#{e.class.name}: #{e.message}", *e.backtrace].join("\n"))
|
||||||
raise OBSWSError.new([e.message, *e.backtrace].join("\n"))
|
raise OBSWSError.new([e.message, *e.backtrace].join("\n"))
|
||||||
|
Loading…
Reference in New Issue
Block a user