Article Details
Id:15925
Product:finPOWER Connect
Type:FIX
Version:3.01.11
Opened:07/03/2019
Closed:13/03/2019
Released:03/04/2019
Job: J021984

Business Layer; updated several functions that internally use String.Format to trap errors

Several functions in the Business Layer, that use String.Format internally, have been updated to add error trapping.

This means, instead of finPOWER Connect crashing or a script returning a runtime error, the text is output without the formatting replacements.

For example; finBL.DebugPrintFormat("This will error {0} {1}", "one") will error because format item {1} does not exist parameter arguments.

Error trapping has been added to:

ISError.ErrorBeginFormat
ISError.ErrorExtendFormat
ISValidationItems.AddFormat
ISupport.DebugPrintFormat
finHtmlSummaryPage2StringBuilder.AppendFormat
finHtmlSummaryPage2StringBuilder.AppendLineFormat
finHtmlSummaryPage2StringBuilder.FormatError
finHtmlSummaryPage2StringBuilder.FormatHelp
finHtmlSummaryPage2StringBuilder.FormatInfo
finHtmlSummaryPage2StringBuilder.FormatWarning
ISHtmlSummaryPageStringBuilder.AppendFormat
ISHtmlSummaryPageStringBuilder.AppendLineFormat

In addition, the function finClientFunctions.LogUpdateWebMailRead would fail if the Log did not belong to the correct Client. The error message used the String.Format function but did not provide the correct parameters.