From 3e48a64a37c87c6ac1ef30e0528bd6b4d1c6939a Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 1 Apr 2011 16:20:02 +0200 Subject: Added some more error handling to the elf2e32_qtwrapper. RevBy: Liang Qi --- bin/elf2e32_qtwrapper.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/elf2e32_qtwrapper.pl b/bin/elf2e32_qtwrapper.pl index 02f4f0d..d44b2da 100755 --- a/bin/elf2e32_qtwrapper.pl +++ b/bin/elf2e32_qtwrapper.pl @@ -125,7 +125,7 @@ while (1) { } open($newDefFile, "< $defoutput[1]") or die("Could not open $defoutput[1]"); open($tmpDefFile, "> $defoutput[1].tmp") or die("Could not open $defoutput[1].tmp"); - print($tmpDefFile "EXPORTS\n"); + print($tmpDefFile "EXPORTS\n") or die("Could not write to temporary DEF file: $!"); $fixupFile = "$defoutput[1].tmp"; while (1) { my $origDefLine; @@ -210,9 +210,9 @@ while (1) { # Auto-absent symbols. $extraData .= " ABSENT"; } - print($tmpDefFile "\t$sym \@ $ordinal $extraData\n"); + print($tmpDefFile "\t$sym \@ $ordinal $extraData\n") or die("Could not write to temporary DEF file: $!"); } - print($tmpDefFile "\n"); + print($tmpDefFile "\n") or die("Could not write to temporary DEF file: $!"); close($origDefFile) if ($definput[1]); close($newDefFile); close($tmpDefFile); @@ -260,6 +260,6 @@ if ($buildingLibrary) { } if ($differenceFound) { - copy($tmpdso[1], $dso[1]); + copy($tmpdso[1], $dso[1]) or die("Could not copy $tmpdso[1] to $dso[1]: $!"); } } -- cgit v0.12