Ok, I'm talking about temporary tables and yes,it could happen to you even you think that the temporary table is no longer exists. Consider the below script where stored procedure inserts the data with wrong type which caused the error(245conversion error). As you propably know we would never name the constraints for local temporary tables (as opposite to permanent tables), because if we run the following statement from two connections we get something like that.
Msg 2714, Level 16, State 4, Line 1
There is already an object named 'PK_tmp1' in the database
ALTER PROCEDURE spSample
CREATE TABLE #tmp(
col int --PRIMARY KEY NONCLUSTERED--,
CONSTRAINT PK_tmp1 PRIMARY KEY NONCLUSTERED
INSERT INTO #tmp SELECT 'A'
SELECT * FROM sys.objects
WHERE OBJECT_NAME(OBJECT_ID)like '%#tmp%'
Try add DROP TABLE #tmp in BEGIN CATCH ..block and then SQL Server deletes the constraint as well.