Lasso Soft Inc. > Home

[Protect] ... [/Protect]

[Protect] ... [/Protect] protects a portion of a page.

If code inside the container throws an error or a [Fail] tag is exected inside the container then the error is not allowed to propagate outside the protected block.

If the [Protect] ... [/Protect] container includes any [Handle] ... [/Handle] tags they will be called when an error is reported within the container or when the container completes.

Note: Custom tags, included files, and libraries are all surrounded by an implicit set of [Protect] ... [/Protect] tags.

  • Syntax
  • Parameters
[Protect]
  ...
[/Protect]
Examples

To protect a portion of a page from error reporting:

Use the [Protect] ... [/Protect] tags. Lasso will not allow any error messages to propagate outside of a protect block. The following code fails with an error -1, but this error is not reported to the visitor since it is caught by the protect block.

[Protect]
  [Fail: -1, 'Unknown Error]
[/Protect]
Tag Link [Protect] ... [/Protect] Category Error
Type Container Data Source Any
Support Preferred Version 5.0
Output Type None Security None
Implementation Internal Sets Lasso 6.0, Lasso 5.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft