From: SourceForge.net <no...@so...> - 2006-05-02 21:58:04
|
Patches item #1480707, was opened at 2006-05-02 14:58 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315655&aid=1480707&group_id=15655 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: John Ralls (jralls) Assigned to: Nobody/Anonymous (nobody) Summary: Helpful message with wxLogTraceMask Initial Comment: The latest implementation of Wx::LogTraceMask filters @_ through sprintf. This is nice if one wants to make a nice formatted log message, but it also makes a diagnostic if one messes up and feeds Wx::LogTraceMask only one parameter. To help the user find such goofs (I tend to make them when I convert a LogDebug or a LogError to LogTraceMask), I've added a carp: --- Wx.pm.~1.86.~ 2006-05-02 14:01:32.000000000 -0700 +++ Wx.pm 2006-05-02 14:46:43.000000000 -0700 @@ -257,6 +257,7 @@ # package Wx; +use Carp; # easier to implement than to wrap sub GetMultipleChoices { @@ -281,6 +282,7 @@ sub LogTraceMask { my( $m ) = shift; + carp ("No message for $m") unless @_; my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogTraceMask( $m, $t ); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315655&aid=1480707&group_id=15655 |