addon/services/scheduler.js
function exec(target, method, args, onError, stack) {
	try {
		method.apply(target, args);
	} catch (e) {
		if (onError) {
			onError(e, stack);
		}
	}
}
function exec(target, method, args, onError, stack) {
	try {
		method.apply(target, args);
	} catch (e) {
		if (onError) {
			onError(e, stack);
		}
	}
}
function exec ( target , method , args , onError , stack ) { try { method . apply ( target , args ) ; } catch ( e ) { if ( onError ) { onError ( e , stack ) ; } } }
Try to exec a function with target and args.

When function throws an error it calls onError function with error and stack.

@method exec
@param {Object} target
@param {Function|String} method
@param {Array} args
@param {Function} onError
@param {Error} stack
@private
Try to exec a function with target and args .