lib/application.js
function error(exception) {
		if (typeof customErrorHandler === 'function') {
			customErrorHandler(exception);
			return;
		}
		if (globalConfig.debug) {
			throw exception;
		} else {
			application.fire('error', {
				exception: exception
			});
		}
	}
function error(exception) {
		if (typeof customErrorHandler === 'function') {
			customErrorHandler(exception);
			return;
		}
		if (globalConfig.debug) {
			throw exception;
		} else {
			application.fire('error', {
				exception: exception
			});
		}
	}
function error ( exception ) { if ( typeof customErrorHandler === 'function' ) { customErrorHandler ( exception ) ; return ; } if ( globalConfig . debug ) { throw exception ; } else { application . fire ( 'error' , { exception : exception } ) ; } }
Signals that an error has occurred. If in development mode, an error
is thrown. If in production mode, an event is fired.
@param {Error} [exception] The exception object to use.
@returns {void}
@private
Signals that an error has occurred . If in development mode an error is thrown . If in production mode an event is fired .