Using Lazr error

The Lazr error helper allows generic error handling for site-wide issues such as ajax-related errors, via the lazr.error.display_error() method. See main error example for more details. This page demonstrates the minimal error widget.

Demo

Enter your error here:

A second error should appear in the error widget after 3 seconds.

Page setup

The following Javascript and CSS files have been included for the example on this page:

Javascript

In addition to the JS inclusions documented on the default error example.
  <script type="text/javascript" src="../../build/error/error-widget-minimal.js"></script>
Also the overlay inclusion is not necessary when using the minimal widget (actually, it is still required because the BasicErrorWidget is still sitting in the error.js file rather than a separate file).

CSS

The minimal widget removes the need to include the pretty overlay styles.

Add the required minimal style.

Widget Setup

Refer to the default example for the standard error setup and options.

You can plug alternative error widgets, such as the minimal error widget, into the lazr error module as follows:

    Y.lazr.error.widget = new Y.lazr.error_widgets.MinimalErrorWidget(
        {"visible": false});
    Y.lazr.error.widget.render();