Re: [PATCH v2] Git.pm: Use File::Temp->tempfile instead of ->new

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Abhijit Menon-Sen wrote:
> At 2008-09-08 12:53:01 -0400, marcus@xxxxxxxx wrote:
>> +		my $fname;
>> +		($$temp_fd, $fname) = File::Temp->tempfile(
>> +			'Git_XXXXXX', UNLINK => 1
>>  			) or throw Error::Simple("couldn't open new temp file");
> 
> What happens when tempfile croaks on error?

I was indifferent to the idea of catching the ->tempfile croak just to hide it in our
own error (since the ->tempfile croak would have more information), in which case the
extra 'or throw' may be superfluous, but I kept it as a defensive programming practice.

-- 
Marcus Griep
GPG Key ID: 0x5E968152
——
http://www.boohaunt.net
את.ψο´

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux