FormatErrorMessage

Formats a string to be used in a multi-line error message
  • Free Function
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

SELECT SQLHTTP.net.FormatErrorMessage ( @ErrorMessage )

Arguments:

Name Type Description
@ErrorMessage nvarchar(4000) String Expression to be formatted.

Return Type:

nvarchar(4000)

Remarks:

HTML
tags as well as NCHAR(13) characters serve as line breaks.

Sample Usage:

Msg 50000, Level 16, State 1, Line 4
***********************
* Pretty Error Line 1 *
* Pretty Error Line 2 *
***********************

See Also: