<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Schemers,<div><br class="webkit-block-placeholder"></div><div>I'm trying to write some code to log database transactions. Here is a distilled example:</div><div><br class="webkit-block-placeholder"></div><div><font class="Apple-style-span" face="Monaco"> File example.ss:</font></div><div><font class="Apple-style-span" face="Monaco"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" face="Monaco"> 1 (define (main)</font></div><div><font class="Apple-style-span" face="Monaco"> 2 (call-with-transaction save-my-data))</font></div><div><font class="Apple-style-span" face="Monaco"> 3 </font></div><div><font class="Apple-style-span" face="Monaco"> 4 ;; ( -> void )</font></div><div><font class="Apple-style-span" face="Monaco"> 5 (define (save-my-data)</font></div><div><font class="Apple-style-span" face="Monaco"> 6 (insert-into-database "a" "b" "c"))</font></div><div><br></div><div>I'd like to add some logging to insert-into-database, including some details about where call-with-transaction was called from. For example, for the code above I'd like insert-into-database to know that call-with-transaction was called from line 2, column 2 of example.ss.</div><div><br class="webkit-block-placeholder"></div><div>I'm sure I need to convert call-with-transaction to a macro to get access to the position of the call site. However, I'm not sure of the "correct" way of passing the information to insert-into-database. It seems like I have at least two options: continuation marks and parameters, but I don't know the relative merits of which, or which I should choose in this type of situation.</div><div><br class="webkit-block-placeholder"></div><div>Can anyone offer any advice (or information on the difference between the two)?</div><div><br class="webkit-block-placeholder"></div><div>Thanks in advance,</div><div><br class="webkit-block-placeholder"></div><div>-- Dave</div><div><br class="webkit-block-placeholder"></div><div>PS - Transactions may be nested, and I'd like to log the position the outermost call-with-transaction.</div><div><br></div></body></html>