RoxenCMS 17Web Developer ManualSiteBuilder Tags

   

<sb-app-launcher>
<sb-block-dependencies>
<sb-edit-area>
<sb-error>
<sb-force-language>
<sb-get-permanent-link>
<sb-login>
<sb-notify-change>
<sb-precache-change>
<sb-register-dependency>
<sb-resolve-permanent-link>

<sb-error></sb-error>

Provided by module: CMS: Tags

Returns its content if an error occured in a previous tag. This tag can investigate errors from the following plugins and tags:

<if sb-user-op>, <emit sb-stationeries>, <emit sb-log>, <emit sb-file-languages> and all subtags within <sb-edit-area>.

<sb-edit-area> <sb-commit file="page.xml.html" message="Page created."/> <sb-error> A "&_.type;" error occured during "&_.operation;" on the file "&_.sbobj;". The reason is: "&_.reason;". </sb-error> </sb-edit-area>

If any of these errors occurs during the commit operation, the operation will be halted and an apropriate message will be returned.

<catch> <sb-edit-area> <define container="sb-handle-error"> <sb-error><throw preparse="preparse"> A "&_.type;" error occured during "&_.operation;" on the file "&_.sbobj;". The reason is: "&_.reason;". </throw></sb-error> </define> <sb-set-metadata file="page.xml.html" name="template">common.xsl</sb-set-metadata> <sb-handle-error /> <sb-commit file="page.xml.html" message="Changed the template."/> <sb-handle-error /> </sb-edit-area> </catch>

This example defines a tag that manages all the error output. Together with the <catch> and the <throw> tags the error management is made more powerful. The newly defined tag, <sb-handle-error> will in this example halt the operation and return the error messages if any errors are found in the metadata, i.e. the commit operation will not be performed. The same will happen if any errors occurs during the commit operation.


&_.operation; (provided by CMS: Tags)

Returns what kind of operation was performed, i.e. what operation inside SiteBuilder failed.


&_.reason; (provided by CMS: Tags)

Returns the reason to why the error occurred.


&_.sbobj; (provided by CMS: Tags)

Returns all information about the file, including state and user.


&_.state; (provided by CMS: Tags)

Returns the file's state, e.g. if it was locally modified, etc.


&_.type; (provided by CMS: Tags)

Returns the type of error, e.g. "invalid file", "invalid language code" etc.


&_.vcobj; (provided by CMS: Tags)

Compatibility. Same as sbobj.