Package: galrey
Version: 1.0.1-1
Severity: important
Tags: patch
There are several problems with the error handling in galrey:
Error messages go to STDOUT not STDERR
Exit code does not indicate failure
In some cases, if printing the error message fails the program continues
(print "" and exit; looks cute, but is wrong)
--- /usr/bin/galrey~ 2005-10-06 01:01:01.000000000 -0700
+++ /usr/bin/galrey 2005-10-06 13:32:42.000000000 -0700
@@ -166,8 +166,7 @@
if ($error == 1)
{
# Error: the specified pattern is wrong
- print "The specified pattern is not selective.\n";
- exit;
+ die "The specified pattern is not selective.\n";
}
sort(@filenames);
@@ -176,15 +175,14 @@
if ($i == 0)
{
- print "No images to process...\n";
- exit;
+ die "No images to process...\n";
}
if ($c_memofile ne '')
{
my @orderedfiles; # Ordered file patch, by Michael Benedict
- open(MEMOFILE, "<$c_memofile") or print "Memofile does not exist.\n" and
exit;
+ open(MEMOFILE, "<$c_memofile") or die "Memofile does not exist.\n";
while (<MEMOFILE>)
{
@@ -401,8 +399,8 @@
my $w = shift;
my $h = shift;
- open(TEMPLATE, "<$c_template") or print "Template file doesn't exist.\n" and
exit;
- open(OUTFILE, ">$f") or print "Can't open outfile.\n" and exit;
+ open(TEMPLATE, "<$c_template") or die "Template file doesn't exist.\n";
+ open(OUTFILE, ">$f") or die "Can't open outfile.\n";
while (<TEMPLATE>)
{
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages galrey depends on:
ii imagemagick 6:6.2.4.5-0.1 Image manipulation programs
ii perl 5.8.7-5 Larry Wall's Practical Extraction
galrey recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]