search for: _write_error

Displaying 1 result from an estimated 1 matches for "_write_error".

Did you mean: write_error
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
...path => $path, + error => $!))); + + $self->{fh} = $fh; + $self->{is_sparse} = $is_sparse; + + return $self; +} + +sub write +{ + my $self = shift; + my ($buf) = @_; + + print { $self->{fh} } $buf or $self->_write_error($!); +} + +sub close +{ + my $self = shift; + close($self->{fh}) or $self->_write_error($!); +} + +sub _write_error +{ + my $self = shift; + my ($error) = @_; + + die(user_message(__x("Error writing to {path}: {error}", + path => $self->{...