This documentation is currently being moved to our new documentation site.

Please view or edit the documentation there, instead.

If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

fluid.fail(message)

Causes an error message to be logged to the console and a real runtime error to be thrown.

fluid.fail(message);

File name: Fluid.js

Parameters

message (String|Error) The error message to log

Return Value

none

 

Example

var inputField = that.locate("inputField");
if (inputField.lengh === 0) {
    fluid.fail("No input field was found."); 
}

In this example, a component DOM Binder locate function is used to find the element specified by the inputField selector. If no such element is found, an error is thrown using fluid.fail().

  • No labels