The rollback transaction request has no corresponding BEGIN TRANSACTION

I have a test in delete trigger, that reports error if record should not
be deleted.

raiserror 30500 "This record must not be deleted!"
rollback  transaction

It works fine if I try to delete record from SQL Enterprise Manager, but
it doesent work with Delphi!
In Delphi I get error message "The rollback transaction request has no
corresponding BEGIN TRANSACTION" instead of my message.

If I delete second line from trigger ("rollback transaction") it works
fine with Delphi, but it doesn't with SQL Enterprise Manager. EM reports
error message, but  also deletes record.

How can I cancel delete of a record in delete trigger and show custom
error message? It should work regardles which client application
launched DELETE statement.