[Xml-compile] XML::Compile::Translate 1.35 - Log::Report?

Patrick Powell papowell at astart.com
Wed Sep 4 00:23:46 GMT 2013


GRrrrr.... I cut and pasted the same buffer...  I will try again.

On 09/03/13 00:42, Mark Overmeer wrote:
> * Patrick Powell (papowell at astart.com) [130902 16:11]:
>> Problem 1:
>>
>> The 'topLevel($$) routine has an error message:
>>
>>         or error __x(( $fullname eq $path
>> # original           ? N__"cannot find element or attribute `{name}'"
>> # original           : N__"cannot find element or attribute `{name}'
>> at {where}"
>>                      ? "cannot find element or attribute `{name}'"
>>                      : "cannot find element or attribute `{name}' at
>> {where}"
>>                      ), name => $fullname, where => $path, _class =>
>> 'usage');
>>
>>
>> If the orginal lines are left in, you get the following error message
>>
>>
>> ERROR ERROR try-block stopped with ERROR: error: cannot find element
>> or attribute `errorReportMsg'
>>
>>
>> If you replace them by the indicated ones, you get:
>>
>> ERROR ERROR try-block stopped with ERROR: error: cannot find element
>> or attribute `errorReportMsg'
> Problem?  I see twice the same message... so why do you think this is
> a problem?  The longer syntax is needed because the translation text
> harvester (xgettext-perl) whould otherwise not detect the string.
> N__() is a no-op function at runtime
>
>> Problem 2:
>>
>> This is perl 5, version 14, subversion 4 (v5.14.4)
>>
>> The call to the topLevel() routine is done using:
>>
>>      #eval {
>>          ($answer, $trace) = $call->(%$params);
>>      #};
>>      print "ProcessRequest: REQUEST '$request' ERROR '$@'\n"
>>
>> The exception is not caught and the program exits.   If you use the
>> 'eval' then
>> you get:
>>    ProcessRequest: REQUEST 'GetFaultRequest' ERROR ''
>>
>> Apparently the Exception is not being propagated inside the eval.
>> This was a problem before in a
>> much older version of Log::Report.
> There is something wrong, because
>
>     > perl -MLog::Report -e 'error "help"'
>     error: help
>
>     >  perl -MLog::Report -e 'try {error "help"}; print $@'
>     try-block stopped with ERROR: error: help
>
>     > perl -MLog::Report -e 'eval {error "help"}; print $@'
>     error: help
>     error: help
>
>     > perl -MLog::Report -e 'try {error "help"}; print $@->wasFatal'
>     error: help
>
> The last version is the right one, however the third should not produce
> a double message.  But none of these four reproduce your report.
Right.  This is what is so very strange.  It I am going to try using 
'try' instead of 'eval'
and see if this makes a difference.



More information about the Xml-compile mailing list