Difference between revisions of "Dbo.uspPrintError (procedure)"
Line 2: | Line 2: | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
− | |- | + | |- valign="top" |
| '''Procedure | | '''Procedure | ||
| dbo.uspPrintError | | dbo.uspPrintError | ||
Line 8: | Line 8: | ||
| '''Description | | '''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. | | 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 === | === Source === | ||
Line 43: | Line 41: | ||
| '''Child Object | | '''Child Object | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Procedure | | Procedure | ||
− | | [[dbo.uspLogError_(procedure)|dbo.uspLogError]] | + | | [[dbo.uspLogError_(_(procedure))|dbo.uspLogError]] |
| | | | ||
| | | | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Table | | Table | ||
− | | [[Production.WorkOrder_(table)|Production.WorkOrder]] | + | | [[Production.WorkOrder_(_(table))|Production.WorkOrder]] |
| Trigger | | Trigger | ||
| iWorkOrder | | iWorkOrder | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Table | | Table | ||
− | | [[Production.WorkOrder_(table)|Production.WorkOrder]] | + | | [[Production.WorkOrder_(_(table))|Production.WorkOrder]] |
| Trigger | | Trigger | ||
| uWorkOrder | | uWorkOrder | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Table | | Table | ||
− | | [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]] | + | | [[Purchasing.PurchaseOrderDetail_(_(table))|Purchasing.PurchaseOrderDetail]] |
| Trigger | | Trigger | ||
| iPurchaseOrderDetail | | iPurchaseOrderDetail | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Table | | Table | ||
− | | [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]] | + | | [[Purchasing.PurchaseOrderDetail_(_(table))|Purchasing.PurchaseOrderDetail]] |
| Trigger | | Trigger | ||
| uPurchaseOrderDetail | | uPurchaseOrderDetail | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Table | | Table | ||
− | | [[Purchasing.PurchaseOrderHeader_(table)|Purchasing.PurchaseOrderHeader]] | + | | [[Purchasing.PurchaseOrderHeader_(_(table))|Purchasing.PurchaseOrderHeader]] |
| Trigger | | Trigger | ||
| uPurchaseOrderHeader | | uPurchaseOrderHeader | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Table | | Table | ||
− | | [[Purchasing.Vendor_(table)|Purchasing.Vendor]] | + | | [[Purchasing.Vendor_(_(table))|Purchasing.Vendor]] |
| Trigger | | Trigger | ||
| dVendor | | dVendor | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Table | | Table | ||
− | | [[Sales.SalesOrderDetail_(table)|Sales.SalesOrderDetail]] | + | | [[Sales.SalesOrderDetail_(_(table))|Sales.SalesOrderDetail]] |
| Trigger | | Trigger | ||
| iduSalesOrderDetail | | iduSalesOrderDetail | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Table | | Table | ||
− | | [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]] | + | | [[Sales.SalesOrderHeader_(_(table))|Sales.SalesOrderHeader]] |
| Trigger | | Trigger | ||
| uSalesOrderHeader | | uSalesOrderHeader | ||
− | |- | + | |- valign="top" |
| Execute | | Execute | ||
| Table | | Table | ||
− | | [[Sales.Store_(table)|Sales.Store]] | + | | [[Sales.Store_(_(table))|Sales.Store]] |
| Trigger | | Trigger |
Revision as of 23:59, 23 June 2010
wikibot
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
-- 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
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
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 |