documentcloud/backbone — pull request #2567 by ifishing (2013-05-28 16:46:14+00:00)
Title: Check the parameters passed to Events.listenTo and Events.listenToOnce m...

Codes added here is to check the parameters passed to Events.listenTo and Events.listenToOnce methods.
This patch is for the Issue #2562 created by @danwashusen.
The things frustrating @danwashusen is that the error info thrown is not the actual cause. The root cause is the first parameter passed to Events.listenTo method is null/undefined but Backbone has not checked the passed parameters. I think it is a common issue for Backbone.It is unfriendly to the developers. It may cause the error info is matterless to the true root cause. It is necessary to check the passed parameters and throw corresponding errors.It is helpful for developers to locate the error more accurately.