CREATE PROC PROCNAME
AS
BEGIN
DECLARE @ErrorMessage NVARCHAR(MAX)
BEGIN TRY
Insert into dtls..... --This line will return a Foreign Key exception but i don't need it to be shown when i am executing SP from .net
END TRY
BEGIN CATCH
SELECT @ErrorMessage = ERROR_MESSAGE() --This message alone should be diplayed.
RAISERROR < ...
Go to the complete details ...