You could use a transaction within a try catch. Here is a simplified example. If that works for you, you should follow the pattern outlined in example C on this page http://technet.microsoft.com/en-us/library/ms175976.aspx
CREATE TABLE XYZ(id INT NOT NULL PRIMARY KEY CLUSTERED);
CREATE TABLE ABC(id INT NOT NULL REFERENCES XYZ(id));
INSERT INTO XYZ VALUES (1),(2),(3);
INSERT INTO ABC VALUES (1);
BEGIN TRY
BEGIN TRAN
DELETE FROM XYZ WHERE id = 1;
COMMIT TRAN
END TRY
BEGIN CATCH
-- raise error here
ROLLBACK
END CATCH;
DROP TABLE ABC;
DROP TABLE xyz;
To reiterate, I spent only 4 minutes and 11 seconds typing this - i.e., minimal testing. If you are going to use it on a critical system PLEASE test and satisfy yourself that that is what you want.