Mailing List Archive

CVS notice: activity by bill
CVS activity by user 'bill':
interchange/lib/Vend Interpolate.pm,1.40.2.62,1.40.2.63
Update of /anon_cvs/repository/interchange/lib/Vend
In directory developer.akopia.com:/tmp/cvs-serv25879/lib/Vend

Modified Files:
Tag: DEV_4_7_0
Interpolate.pm
Log Message:
Fixed [try] and [catch] tags

1. Modified original behavior of
[catch]
[error message]
catch block
[/error message]
[/catch]

The original code requires an exact match, including the newline and line
numbers from the Interchange core (i.e., it includes the
" at (eval line nnn)...\n"
message).

The new code strips the 'at (eval ...' to leave an approximation of the
original $@.

Added 'exact' option to invoke original behavior.

There were no instances of [catch] tag usage in the demos affected by this.

2. Added 'clean' option to [try] tag, which suppresses output in case of
error. The default tag output behavior is unchanged.

3. Fixed [try] tag to watch $Session->{try}{$label} instead of $@ after the eval
because $@ as originally written does not trap most errors (which occurred in
earlier eval in the Interchange core).


4. I did not change the default interpolation setting, but I recommend changing
the [catch] tag to interpolate by default. The existing implementation of the
[error message][/error message] regex also strips interchange container tags.

For example, there is a bug in the foundation implementation of log_transaction:

/ic/foundation/etc/log_transaction:141:
=================================================
[catch]
[set mv_route_failed]1[/set]
There was an error adding to the transaction log.
[/catch]
=================================================

The [set ...] ... [/set] will silently disappear without setting mv_route_failed.
CVS notice: activity by bill [ In reply to ]
CVS activity by user 'bill':
interchange/dist/foundation/etc log_transaction,1.1.2.3,1.1.2.4
Update of /anon_cvs/repository/interchange/dist/foundation/etc
In directory developer.akopia.com:/tmp/cvs-serv26597/dist/foundation/etc

Modified Files:
Tag: DEV_4_7_0
log_transaction
Log Message:
Fixed bug in catch block in log_transaction.

As originally written, the catch tag will excise the [set][/set] pair
without executing.

Set interpolate=1 to fix the problem.

/ic/foundation/etc/log_transaction:141
=================================================
[catch label="default" interpolate=1]
[set mv_route_failed]1[/set]
There was an error adding to the transaction log.
[/catch]
=================================================
CVS notice: activity by bill [ In reply to ]
CVS activity by user 'bill':
interchange/lib/Vend Parse.pm,1.12.2.19,1.12.2.20
Update of /anon_cvs/repository/interchange/lib/Vend
In directory developer.akopia.com:/tmp/cvs-serv31329/lib/Vend

Modified Files:
Tag: DEV_4_7_0
Parse.pm
Log Message:
1. Set [catch] tag to interpolate by default

2. Reverted change to dist/foundation/etc/log_error since catch tag now
works properly by default
CVS notice: activity by bill [ In reply to ]
CVS activity by user 'bill':
interchange/dist/foundation/etc log_transaction,1.1.2.4,1.1.2.5
Update of /anon_cvs/repository/interchange/dist/foundation/etc
In directory developer.akopia.com:/tmp/cvs-serv31329/dist/foundation/etc

Modified Files:
Tag: DEV_4_7_0
log_transaction
Log Message:
1. Set [catch] tag to interpolate by default

2. Reverted change to dist/foundation/etc/log_error since catch tag now
works properly by default