function sap/base/assert

Control sample: module:sap/base/assert
Visiblity: public
Available since: N/A
Module: sap/base/assert
Application Component:

A simple assertion mechanism that logs a message when a given condition is not met.

Note: Calls to this method might be removed when the JavaScript code is optimized during build. Therefore, callers should not rely on any side effects of this method.


Parameters Overview

Param Type Default Value Description
bResult boolean Result of the checked assertion
vMessage string|function Message that will be logged when the result is false. In case this is a function, the return value of the function will be displayed. This can be used to execute complex code only if the assertion fails.

Methods Overview

Method Description