tweaks and shit
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Engine / IO / AtomicFile.pm
index f2e1058..5f891d8 100644 (file)
@@ -10,7 +10,8 @@ extends 'MooseX::Storage::Engine::IO::File';
 
 sub store {
        my ($self, $data) = @_;
-       my $fh = IO::AtomicFile->new($self->file, 'w');
+       my $fh = IO::AtomicFile->new($self->file, 'w')
+           || confess "Unable to open file (" . $self->file . ") for storing : $!";
        print $fh $data;
        $fh->close() 
            || confess "Could not write atomic file (" . $self->file . ") because: $!";