summaryrefslogtreecommitdiffstats
path: root/lib/puppet/storage.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-07-11 20:51:52 +0000
committerLuke Kanies <luke@madstop.com>2005-07-11 20:51:52 +0000
commit75e27cf8f387816526860df3ad0d38ddce8eeb01 (patch)
treea9a251e7e28a6573ad654eb7ef94fe29e42fb97a /lib/puppet/storage.rb
parent0417fb59f4493b98fea9b03a60cb21ffc0f8bed4 (diff)
downloadpuppet-75e27cf8f387816526860df3ad0d38ddce8eeb01.tar.gz
puppet-75e27cf8f387816526860df3ad0d38ddce8eeb01.tar.xz
puppet-75e27cf8f387816526860df3ad0d38ddce8eeb01.zip
cleaning up bugs in the tests, and adding more error checking around the bugs
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@359 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/storage.rb')
-rw-r--r--lib/puppet/storage.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/puppet/storage.rb b/lib/puppet/storage.rb
index 67969c76f..eb639e32e 100644
--- a/lib/puppet/storage.rb
+++ b/lib/puppet/storage.rb
@@ -38,7 +38,13 @@ module Puppet
file.each { |line|
myclass, key, value = line.split(@@splitchar)
- @@state[eval(myclass)][key] = Marshal::load(value)
+ begin
+ @@state[eval(myclass)][key] = Marshal::load(value)
+ rescue => detail
+ raise RuntimeError, "Failed to load value for %s::%s => %s" % [
+ myclass,key,detail
+ ], caller
+ end
}
}