Documentation
    Preparing search index...
    • In DEV environment, emits an error message. This is usally used to indicate a critial failure during development process.

      Parameters

      • Optionalmessage: string

        message content.

      Returns void

      In DEV mode, this function will

      • show user an alert message box (if confirm or alert function is available in global scope),
      • trigger a debugger breakpoint,
      • throw an error to the caller,
        • This means if there is error handler (try...catch) present on the stack trace, such unhandled error might cause unexpected behavior (as there is an unhandled error bubbling up).
      • and signal the failure with console.assert function. In PROD mode, this function does nothing. Bundler should be optimizing such call away.

      Thus, please note that this function may or may not stop the caller's code execution.