Error Handling

There are a couple of options for capturing errors encountered during the assembly of Fabricator view and partials.

options.logErrors

Type: Boolean

Whether or not to log errors to console. If set to false, the app will exit on error.

By default, this value is set to true in dev mode and false in build mode. Generally, you should tolerate errors in development, but not when building for release.

assemble({
    logErrors: true
});

options.onError

Type: Function

Error handler function. Receives an error object param. Helpful if you want to customize your error handling.

assemble({
    onError: function (err) {
        notify(err.message);
    }
});