include backtrace in error log

This commit is contained in:
onyx-and-iris 2023-08-02 00:14:17 +01:00
parent 9ed21ffc38
commit f4be09be2a
2 changed files with 10 additions and 2 deletions

View File

@ -74,7 +74,11 @@ module Voicemeeter
end
res
rescue Errors::VMCAPIError => e
logger.error "#{e.class.name}: #{e.message}"
err_msg = [
"#{e.class.name}: #{e.message}",
*e.backtrace
]
logger.error err_msg.join("\n")
raise
end

View File

@ -32,7 +32,11 @@ module Voicemeeter
Pathname.new(value).dirname
end
rescue Win32::Registry::Error => e
logger.error "#{e.class.name}: #{e.message}"
err_msg = [
"#{e.class.name}: #{e.message}",
*e.backtrace
]
logger.error err_msg.join("\n")
raise Errors::VMInstallError.new "unable to read Voicemeeter path from the registry"
end