From f87e4108a8bf65cdfa60dc58c38472744181060f Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 5 Jun 2013 11:26:41 +0200 Subject: [PATCH] Rethrow error if the error coming from router is not "Route missing" --- assets/scripts/app/routes.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/scripts/app/routes.coffee b/assets/scripts/app/routes.coffee index 581ce2dc..6fdc38bb 100644 --- a/assets/scripts/app/routes.coffee +++ b/assets/scripts/app/routes.coffee @@ -43,7 +43,10 @@ Ember.Router.reopen try @_super(url) catch error - @_super('/not-found') if error.message.match(/No route matched the URL/) + if error.message.match(/No route matched the URL/) + @_super('/not-found') + else + throw(error) # TODO: don't reopen Ember.Route to add events, there should be # a better way (like "parent" resource for everything inside map)