USE [RiskCurve]
GO
/****** Object: StoredProcedure [dbo].[CatchError] Script Date: 02/09/2012 17:17:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*********************************************************
Procedure Name: CatchError
Version: 1.0
Purpose: This procedure is used to save ERROR LOG .
Input: Many peramnetrs
Default value: None
Output:
Returns:
Dependencies:
Tables: Request
Procedures: No
Created By: Pradeep Kumar
Created Date: 19-MAY-2011
Checked by & Date:
Modifier & Date:
Modification Description:
Modification Purpose:
Limitations/Restriction:
Algorithm:
*********************************************************/
ALTER PROCEDURE [dbo].[CatchError]
AS
BEGIN
--To keep the error message
Declare @ErrMsg as varchar(1000)
BEGIN TRY
INSERT INTO dbo.Error_Log(Error_Date,Error_Msg,Error_Number,Error_Source )
SELECT DATEADD(HOUR, 20, GETDATE()), ERROR_MESSAGE() ,ERROR_NUMBER(), ERROR_PROCEDURE()
END TRY
BEGIN CATCH
END CATCH
set @ErrMsg = ERROR_MESSAGE()
Raiserror(@ErrMsg -- Error Message
, 16 --Severity Level
, 1 --State
)
END
GO
/****** Object: StoredProcedure [dbo].[CatchError] Script Date: 02/09/2012 17:17:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*********************************************************
Procedure Name: CatchError
Version: 1.0
Purpose: This procedure is used to save ERROR LOG .
Input: Many peramnetrs
Default value: None
Output:
Returns:
Dependencies:
Tables: Request
Procedures: No
Created By: Pradeep Kumar
Created Date: 19-MAY-2011
Checked by & Date:
Modifier & Date:
Modification Description:
Modification Purpose:
Limitations/Restriction:
Algorithm:
*********************************************************/
ALTER PROCEDURE [dbo].[CatchError]
AS
BEGIN
--To keep the error message
Declare @ErrMsg as varchar(1000)
BEGIN TRY
INSERT INTO dbo.Error_Log(Error_Date,Error_Msg,Error_Number,Error_Source )
SELECT DATEADD(HOUR, 20, GETDATE()), ERROR_MESSAGE() ,ERROR_NUMBER(), ERROR_PROCEDURE()
END TRY
BEGIN CATCH
END CATCH
set @ErrMsg = ERROR_MESSAGE()
Raiserror(@ErrMsg -- Error Message
, 16 --Severity Level
, 1 --State
)
END
3:54 AM |
Category: |
0
comments
Comments (0)