RaiseErrorOnSxmlError

Release 1.4 - ...

When th debug feature "RaiseErrorOnSxmlError" is enabled in the Smartsite.config file, Smartsite ignores any error parameter on both vipers and macros. This helps you finding errors that may otherwise be silently ignored. Errors not only occur because there is a problem, they also have a performance penalty. Handling errors is almost always slower than handling the case normally.

It is good practice to handle special cases properly instead of relying on the error parameter.

Smartsite SXML CopyCode image Copy Code
{buffer.set(mystring, abc)}

<!--// Do it like this -->
{buffer.set(myvalue, sys.iif(string.length($mystring) > 10, string.substring($mystring, 10), ""))}

<!--// Don't do it like this -->
{buffer.set(myvalue, string.substring($mystring, 10, error=""))}