Difference between revisions of "Dbo.uspPrintError (procedure)"
| Line 44: | Line 44: | ||
| Execute | | Execute | ||
| Procedure | | Procedure | ||
| − | | [[dbo.uspLogError_ | + | | [[dbo.uspLogError_(procedure)|dbo.uspLogError]] |
| | | | ||
| Line 51: | Line 51: | ||
| Execute | | Execute | ||
| Table | | Table | ||
| − | | [[Production.WorkOrder_ | + | | [[Production.WorkOrder_(table)|Production.WorkOrder]] |
| Trigger | | Trigger | ||
| Line 58: | Line 58: | ||
| Execute | | Execute | ||
| Table | | Table | ||
| − | | [[Production.WorkOrder_ | + | | [[Production.WorkOrder_(table)|Production.WorkOrder]] |
| Trigger | | Trigger | ||
| Line 65: | Line 65: | ||
| Execute | | Execute | ||
| Table | | Table | ||
| − | | [[Purchasing.PurchaseOrderDetail_ | + | | [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]] |
| Trigger | | Trigger | ||
| Line 72: | Line 72: | ||
| Execute | | Execute | ||
| Table | | Table | ||
| − | | [[Purchasing.PurchaseOrderDetail_ | + | | [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]] |
| Trigger | | Trigger | ||
| Line 79: | Line 79: | ||
| Execute | | Execute | ||
| Table | | Table | ||
| − | | [[Purchasing.PurchaseOrderHeader_ | + | | [[Purchasing.PurchaseOrderHeader_(table)|Purchasing.PurchaseOrderHeader]] |
| Trigger | | Trigger | ||
| Line 86: | Line 86: | ||
| Execute | | Execute | ||
| Table | | Table | ||
| − | | [[Purchasing.Vendor_ | + | | [[Purchasing.Vendor_(table)|Purchasing.Vendor]] |
| Trigger | | Trigger | ||
| Line 93: | Line 93: | ||
| Execute | | Execute | ||
| Table | | Table | ||
| − | | [[Sales.SalesOrderDetail_ | + | | [[Sales.SalesOrderDetail_(table)|Sales.SalesOrderDetail]] |
| Trigger | | Trigger | ||
| Line 100: | Line 100: | ||
| Execute | | Execute | ||
| Table | | Table | ||
| − | | [[Sales.SalesOrderHeader_ | + | | [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] |
| Trigger | | Trigger | ||
| Line 107: | Line 107: | ||
| Execute | | Execute | ||
| Table | | Table | ||
| − | | [[Sales.Store_ | + | | [[Sales.Store_(table)|Sales.Store]] |
| Trigger | | Trigger | ||
Latest revision as of 23:15, 23 June 2010
wikibot[edit]
| Procedure | dbo.uspPrintError |
| Description | Prints error information about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without printing any error information. |
Source[edit]
-- uspPrintError prints error information about the error that caused
-- execution to jump to the CATCH block of a TRY...CATCH construct.
-- Should be executed from within the scope of a CATCH block otherwise
-- it will return without printing any error information.
CREATE PROCEDURE [dbo].[uspPrintError]
AS
BEGIN
SET NOCOUNT ON;
-- Print error information.
PRINT 'Error ' + CONVERT(varchar(50), ERROR_NUMBER()) +
', Severity ' + CONVERT(varchar(5), ERROR_SEVERITY()) +
', State ' + CONVERT(varchar(5), ERROR_STATE()) +
', Procedure ' + ISNULL(ERROR_PROCEDURE(), '-') +
', Line ' + CONVERT(varchar(5), ERROR_LINE());
PRINT ERROR_MESSAGE();
END;
Dependencies[edit]
| Reference Type | Object Type | Referencing Object | Child Type | Child Object |
| Execute | Procedure | dbo.uspLogError | ||
| Execute | Table | Production.WorkOrder | Trigger | iWorkOrder |
| Execute | Table | Production.WorkOrder | Trigger | uWorkOrder |
| Execute | Table | Purchasing.PurchaseOrderDetail | Trigger | iPurchaseOrderDetail |
| Execute | Table | Purchasing.PurchaseOrderDetail | Trigger | uPurchaseOrderDetail |
| Execute | Table | Purchasing.PurchaseOrderHeader | Trigger | uPurchaseOrderHeader |
| Execute | Table | Purchasing.Vendor | Trigger | dVendor |
| Execute | Table | Sales.SalesOrderDetail | Trigger | iduSalesOrderDetail |
| Execute | Table | Sales.SalesOrderHeader | Trigger | uSalesOrderHeader |
| Execute | Table | Sales.Store | Trigger | iStore |
automatically generated[edit]
| procedure | dbo.uspPrintError |
| Description | Prints error information about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without printing any error information. |
-- uspPrintError prints error information about the error that caused
-- execution to jump to the CATCH block of a TRY...CATCH construct.
-- Should be executed from within the scope of a CATCH block otherwise
-- it will return without printing any error information.
CREATE PROCEDURE [dbo].[uspPrintError]
AS
BEGIN
SET NOCOUNT ON;
-- Print error information.
PRINT 'Error ' + CONVERT(varchar(50), ERROR_NUMBER()) +
', Severity ' + CONVERT(varchar(5), ERROR_SEVERITY()) +
', State ' + CONVERT(varchar(5), ERROR_STATE()) +
', Procedure ' + ISNULL(ERROR_PROCEDURE(), '-') +
', Line ' + CONVERT(varchar(5), ERROR_LINE());
PRINT ERROR_MESSAGE();
END;
| Reference Type | Object Type | Referencing Object | Child Type | Child Object |
| Execute | Procedure | dbo.uspLogError | ||
| Execute | Table | Production.WorkOrder | Trigger | iWorkOrder |
| Execute | Table | Production.WorkOrder | Trigger | uWorkOrder |
| Execute | Table | Purchasing.PurchaseOrderDetail | Trigger | iPurchaseOrderDetail |
| Execute | Table | Purchasing.PurchaseOrderDetail | Trigger | uPurchaseOrderDetail |
| Execute | Table | Purchasing.PurchaseOrderHeader | Trigger | uPurchaseOrderHeader |
| Execute | Table | Purchasing.Vendor | Trigger | dVendor |
| Execute | Table | Sales.SalesOrderDetail | Trigger | iduSalesOrderDetail |
| Execute | Table | Sales.SalesOrderHeader | Trigger | uSalesOrderHeader |
| Execute | Table | Sales.Store | Trigger | iStore |