Module: error

Handles error display and intrusion detection for the application. This module provides functionality to redirect users to a custom error page with a stored message, and dynamically displays it when the page loads. It also includes basic protection mechanisms against inspection or tampering attempts by disabling context menus, blocking specific key combinations, and detecting the use of developer tools. When suspicious behavior is detected, a playful error message is shown.
Source:

Methods

(inner) handleErrorAndRedirect(message)

Handles an error by storing a message in localStorage and redirecting to an error page. Saves the provided error message under the key "streamit_404_error" and navigates the user to "error.html". This is used to display custom error information on a dedicated error page.
Parameters:
Name Type Description
message string The error message to store and display.
Source: