>The problem with your approach that you have to insert your function in each method and function, which is called in the process.
>
>I have an idea in mind, but haven't tested it yet or thought in all details.
>
>ON ESCAPE Error SomeCustomNumber
>
>Error method of the form will check for this error number and return to what? Will return to master stop the process?
>
>You see, this is just an idea. I'm afraid, that there is no universal solution, and it's too bad. For instance, today I was testing something. One of the processos was FTP file to User's site. Since I didn't have an ability to stop the process, I uploaded some test data to the customer's site. Well, let's hope they were already processed, so this would not cause any problems...
OK, I understand your desire for a universal solution. But, as I said previously, the problem would be the cleanup - cleanup code could vary, depending on the circumstances.
For instance: in some cases, TableRevert() would have to be issued, in some cases you would need a ROLLBACK, in some cases you would have to clean up temporary files, etc.
Perhaps you can create a generic solution which works in many cases, and then go ahead and add custom code to certain classes (for the cleanup I mentioned above).
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)