3 things: 1) please, please don't use cursors if you don't have to. 2) you can log by using either RAISERROR WITH LOG or by inserting data into a table variable and then inserting that into a real table after you've rolledback your transaction. This is possible because table variables are transaction independent.
3) Use the try catch block.
There is no reason to use @@ERROR now: TRY/CATCH is far more reliable. To understand more then I recommend reading Erland Sommarskog's "Error Handling in SQL 2005 and Later" which is one the definitive articles on the subject.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.