derickbailey/backbone.marionette — pull request #18 by beardtwizzle (2012-02-01 22:08:37+00:00)
Title: Minor update to application's event aggregator

We've found the following addition very useful when using Marionette, and thought that it may be a nice add to the main project.

Currently it is easy to bind to the event aggregator so that it's awaiting an event called `save:images` but elsewhere in your app, you mistakenly have your trigger firing `save:image`. In large scale apps it would be nice for these "loner" triggers to be routed out quickly.

This update simply overrides the standard `trigger` method, so that it first checks the `_callbacks` object for the event that we attempting to trigger. If it can't find it, an error is thrown.