Yeah use RAISERROR. Depending on your goal, you can use the TRY-CATCH block and do something in the CATCH(like log the error or even re-throw the error). Or you can go without a TRY-CATCH block and just let the error bubble up. Here is a sample if it helps:DECLARE @ProcName VARCHAR(1000)DECLARE @Msg VARCHAR(8000)SET @ProcName = 'MyStoredProc'BEGIN TRY IF (@StartDates IS NULL) BEGIN SET @Msg = 'Parameter "@StartDates" cannot be NULL.' RAISERROR(@Msg, 16, 1, 'SprocName') END -- Other stuffEND TRYBEGIN CATCH -- Handle errorEND CATCH