<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&nbsp;database transactions. Here is a distilled example:</div><div><br class="webkit-block-placeholder"></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp;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">&nbsp;&nbsp;1 &nbsp; &nbsp;(define (main)</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp;2 &nbsp; &nbsp; &nbsp;(call-with-transaction&nbsp;save-my-data))</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp;3 &nbsp; &nbsp;</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp;4 &nbsp; &nbsp;;; ( -&gt; void )</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp;5 &nbsp; &nbsp;(define (save-my-data)</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp;6 &nbsp; &nbsp; &nbsp;(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 -&nbsp;Transactions may be nested, and I'd like to log the position the outermost call-with-transaction.</div><div><br></div></body></html>