lib/rake/delphi/tool.rb in rake-delphi-0.0.25 vs lib/rake/delphi/tool.rb in rake-delphi-0.0.26
- old
+ new
@@ -62,14 +62,15 @@
begin
Logger.trace(Logger::DEBUG, "Reading user option '#{name}' in '#{root}'")
::Win32::Registry::HKEY_CURRENT_USER.open(root) do |reg|
key_exists = true
reg_typ, reg_val = reg.read(name)
+ Logger.trace(Logger::TRACE, "Value: #{reg_val}")
return reg_val.gsub('\\', '/')
end
- rescue ::Win32::Registry::Error
- Logger.trace(Logger::DEBUG, "No reg key '%s'?!" % \
- (key_exists ? "#{root}\\#{name}" : root))
+ rescue ::Win32::Registry::Error => e
+ Logger.trace(Logger::DEBUG, "No reg key '%s'?! %s" % \
+ [(key_exists ? "#{root}\\#{name}" : root), e.message])
return ''
end
rescue LoadError
Logger.trace(Logger::DEBUG, 'No `win32/registry` gem?!')
return ''