error
Zone.error(err)
Allows you to add an error to the currently running zone.
import Zone from "can-zone";
new Zone().run( function() {
setTimeout( function() {
Zone.error( new Error( "oh no" ) );
}, 100 );
} ).then( null, function( error ) {
error; // -> {message: "oh no"}
} );
Parameters
- err
{Error}
: