Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
{div:class=} h1.
Wiki Markup
Div
classapi-page

fluid.fail(message)

{section} {column:width=70%} Causes an error message to be logged to the console and a real runtime error to be thrown. {code:javascript|borderStyle=none|bgColor=white}

Section
Column
width70%

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

Code Block
javascript
bgColorwhite
borderStylenone
javascript

fluid.fail(message);
{code} *File

File name:

* {{

Fluid.js

}} h2. Parameters {span:class=

Parameters

Span
classborderless-table

} |*{{message}}*|

message

(String

\

|Error)

The

error

message

to

log |{span} h2. Return Value {span:class=borderless-table} |*none*| {span} {column} {column:width=5%} {column} {column} h3. See Also {column} {section} ---- h3. Example {code:javascript}

log

Return Value

Span
classborderless-table

none

Column
width5%

Column

See Also


Example

Code Block
javascript
javascript

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

In

this

example,

a

component

[Infusion13:

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()

}}

.

{div}