Skip over navigation

Roxen Interactive RXML Help

<sb-error></sb-error>

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" 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" name="template">common.xsl</sb-set-metadata> <sb-handle-error /> <sb-commit file="page.xml" 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.

Defined in content

&_.operation;

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

&_.reason;

Returns the reason to why the error occurred.

&_.sbobj;

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

&_.state;

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

&_.type;

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

&_.vcobj;

Compatibility. Same as sbobj.