Home > rc-js-util > _Debug > error
Throws an Error
with the given message.
Signature:
static error(this: void, message: string): boolean;
Parameter | Type | Description |
---|---|---|
this | void | |
message | string |
Returns:
boolean
A boolean value to make linting happy… will never return.
If _BUILD.DEBUG
is true and _BUILD.DISABLE_BREAKPOINT
is false or unset then a breakpoint will be hit first.
if (errorCondition) {
// in debug mode we error
_BUILD.DEBUG && _Debug.error("oopsy");
// in production we fall back to some other behavior
return errorConditionValue;
}