Caplin Trader 5.1.0

Class: module:ct-component/ErrorComponent

module:ct-component/ErrorComponent(sErrorMessage, sComponentXml, oExceptionopt)

The module:ct-component/ComponentFactory creates a ErrorComponent when it fails to create a normal Component. The ErrorComponent class is used by the application internally to display errors to end-users. The following information is provided so that developers can specify the ErrorComponent's generic error message and style it on the display.

To change the displayed appearance of this message, modify the CSS class loading_message.


new module:ct-component/ErrorComponent(sErrorMessage, sComponentXml, oExceptionopt)

Constructs an ErrorComponent with the specified error message, component XML string and exception.

Name Type Attributes Description
sErrorMessage String

A human readable error message that explains why the ErrorComponent was created.

sComponentXml String

The component XML string that caused an ErrorComponent to be created rather than the intended component.

oException Object <optional>

The exception that was thrown whilst attempting to create a component from the specified XML string. If omitted this will default to null.