Rollback the transaction before you insert into your audit table. Here's a sample using Adventureworks:
BEGIN TRY
BEGIN TRANSACTION
UPDATE [HumanResources].[Department]
SET [Name] = NULL
WHERE [Name] IS NOT NULL
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
INSERT INTO dbo.[AuditLog] (
[Command],
[PostTime],
[HostName],
[LoginName]
) VALUES (
/* Command - nvarchar(1000) */ N'Test',
/* PostTime - nvarchar(24) */ GETDATE(),
/* HostName - nvarchar(100) */ N'Something',
/* LoginName - nvarchar(100) */ N'Someone' )
END CATCH
SELECT * FROM dbo.[AuditLog]
WHERE [HostName] = 'Something'