helpers/validate.js
function BehaviorInterfaceError(baseBehavior, extendingBehavior, missingProps) {
	var extendingName = extendingBehavior.behaviorName || 'anonymous behavior',
		baseName = baseBehavior.__behaviorName || 'anonymous behavior',
		message = 'can-connect: Extending behavior "' + extendingName + '" found base behavior "' + baseName
			+ '" was missing required properties: ' + JSON.stringify(missingProps.related),
		instance = new Error(message);

	if (Object.setPrototypeOf){
		Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
	}
	return instance;
}
function BehaviorInterfaceError(baseBehavior, extendingBehavior, missingProps) {
	var extendingName = extendingBehavior.behaviorName || 'anonymous behavior',
		baseName = baseBehavior.__behaviorName || 'anonymous behavior',
		message = 'can-connect: Extending behavior "' + extendingName + '" found base behavior "' + baseName
			+ '" was missing required properties: ' + JSON.stringify(missingProps.related),
		instance = new Error(message);

	if (Object.setPrototypeOf){
		Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
	}
	return instance;
}
function BehaviorInterfaceError ( baseBehavior , extendingBehavior , missingProps ) { var extendingName = extendingBehavior . behaviorName || 'anonymous behavior' , baseName = baseBehavior . __behaviorName || 'anonymous behavior' , message = 'can-connect: Extending behavior "' + extendingName + '" found base behavior "' + baseName + '" was missing required properties: ' + JSON . stringify ( missingProps . related ) , instance = new Error ( message ) ; if ( Object . setPrototypeOf ) { Object . setPrototypeOf ( instance , Object . getPrototypeOf ( this ) ) ; } return instance ; }
change to 'BehaviourInterfaceError extends Error' once we drop support for pre-ES2015
change to BehaviourInterfaceError extends Error once we drop support for pre - ES2015