The verified answer is wrong. The code does nothing useful and causes a problem.
If an exception is thrown (at least most types), the transaction is rolled back automatically before reaching the catch block, therefore ttsabort there has nothing to abort. That's why ttsabort is almost never used.
And the problem is the catch block handles the exception and instead of interrupting execution on failure, it'll continue as if no exceptions occurred. You should rethrow the exception if there was a reason to have try/catch block at all.
Regarding your actual problem, you mentioned an error, but you didn't tell us what the error was. Please give us more details (where is occurs, what the error message says).
If you have unbalanced ttsbegin/ttscommit, the problem might be caused by some other code. It's also possible that your transaction is aborted inside next save().
I recommend you don't try to create a DB transaction in the form at all. If you explain what you're trying to achieve, we may be able to suggest a better solution.