Log error and stacktrace on mapping errors

This commit is contained in:
Chris Roberts 2022-02-09 09:24:18 -08:00 committed by Paul Hinze
parent c6f6bf0c47
commit e7686882fa
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -249,6 +249,10 @@ module VagrantPlugins
end
logger.debug("map of #{value.class} to #{to.nil? ? 'unknown' : to.inspect} => #{result}")
result
rescue => err
logger.debug("mapping failed of #{value.class} to #{to.nil? ? 'unknown' : to.inspect}")
logger.debug("#{err.class}: #{err}\n" + err.backtrace.join("\n"))
raise
end
# Generate the given type based on given and/or