Bug 4481 - if ($@) { dbg constructs *should* report the value of $@
Summary: if ($@) { dbg constructs *should* report the value of $@
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 3.0.3
Hardware: Other other
: P5 normal
Target Milestone: 3.2.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard: ready for commit
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-15 06:49 UTC by John Bokma
Modified: 2007-04-20 05:31 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
fix patch None Justin Mason [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description John Bokma 2005-07-15 06:49:58 UTC
When tracking problems with DNS, I found:
if ($@) {
    dbg ("NS lookup failed horribly, perhaps bad resolv.conf setting?");

(line 1056: Mail::SpamAssassin::Dns )

of course it's silly *not* to report the value of $@ which contains very
valuable information: like *why* the lookup failed...

I found more of those constructs...
Comment 1 Bob Menschel 2005-07-16 00:25:28 UTC
Triage: John, given that the devs are busy right now working on the last of the
"important" fixes before 3.1.0, and your good suggestion applies only to debug
messages, it'd be a big help if you could submit patches, or at least diffs for
the various items you find. (If diffs, I can probably put together the patches.)
By submitting patches in this format, the devs can drop them into place,
validate them, and get them into 3.1.0; without patches that's unlikely to
happen at this point. 
Comment 2 Justin Mason 2007-04-16 05:34:07 UTC
aim at 3.2.x, for a check
Comment 3 Justin Mason 2007-04-17 12:58:40 UTC
Created attachment 3907 [details]
fix

here's the remaining cases where $@ is used without logging it afterwards -- I
haven't applied it yet.
Comment 4 Justin Mason 2007-04-20 05:31:58 UTC
applied.

: jm 60...; svn commit -m 'bug 4481: always report $@ error messages where
appropriate'
Sending        lib/Mail/SpamAssassin/Conf/LDAP.pm
Sending        lib/Mail/SpamAssassin/Dns.pm
Sending        lib/Mail/SpamAssassin/Logger.pm
Sending        lib/Mail/SpamAssassin/Plugin/RelayCountry.pm
Sending        lib/Mail/SpamAssassin/Plugin/SPF.pm
Sending        spamd/spamd.raw
Transmitting file data ......
Committed revision 530769.