You didn't mention what database you're using, but if you're using SQL Server 2005 or greater, you can use try/catch for this. Here's an example.
BEGIN TRY
select 1/0
END TRY
BEGIN CATCH
SELECT 'statement 1 failed' AS Statement,ERROR_MESSAGE() as ErrorMessage,ERROR_SEVERITY() AS Severity;
END CATCH
BEGIN TRY
select 1.0/2
END TRY
BEGIN CATCH
SELECT 'statement 2 failed' AS Statement,ERROR_MESSAGE() as ErrorMessage,ERROR_SEVERITY() AS Severity;
END CATCH
In this case I'm catching the errors and just returning them as a result set, but you could create a temp table/variable at the beginning, insert into that when an error happens, and then select all rows from that table at the end.
EDIT: Here's an example that will throw an error in a trigger:
create table csm (id int)
go
create trigger tr_i_csm on csm for insert as
declare @d int
select @d=sum(id) from inserted
if (@d>=10)
begin
raiserror('error',@d,0)
end
go
BEGIN TRY
BEGIN TRAN
insert into csm values (5)
COMMIT
END TRY
BEGIN CATCH
ROLLBACK
SELECT 'statement 1 failed' AS Statement,ERROR_MESSAGE() as ErrorMessage,ERROR_SEVERITY() AS Severity;
END CATCH
BEGIN TRY
BEGIN TRAN
insert into csm values(16)
COMMIT
END TRY
BEGIN CATCH
ROLLBACK
SELECT 'statement 2 failed' AS Statement,ERROR_MESSAGE() as ErrorMessage,ERROR_SEVERITY() AS Severity;
END CATCH
BEGIN TRY
BEGIN TRAN
insert into csm values(2)
COMMIT
END TRY
BEGIN CATCH
ROLLBACK
SELECT 'statement 3 failed' AS Statement,ERROR_MESSAGE() as ErrorMessage,ERROR_SEVERITY() AS Severity;
END CATCH
selecT * from csm