Subject SQL Error Handling
Author Arvee
In MSSQL I detected any errors with these codes:

IF @@ERROR <> 0
BEGIN
ROLLBACK TRANSACTION
RETURN(20)
END

How do I detect any errors in Firebird? I test with WHEN statement but it
needs to specify a sqlcode. Is there another way to do similar to
MSSQL code above?

Thanks in advance.