From 1e53c1f92445b0e5ddf762ac995936eca7f1b0e3 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 13 Nov 2014 14:25:28 -0800 Subject: [PATCH] Re-raise errors with throw instead of Promise.reject() --- IPython/html/static/services/contents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/services/contents.js b/IPython/html/static/services/contents.js index c2ee4ba35..11c225511 100644 --- a/IPython/html/static/services/contents.js +++ b/IPython/html/static/services/contents.js @@ -129,9 +129,9 @@ define([ // TODO: update IPEP27 to specify errors more precisely, so // that error types can be detected here with certainty. if (error.xhr.status === 400) { - return Promise.reject(new Contents.DirectoryNotEmptyError()); + throw new Contents.DirectoryNotEmptyError(); } - return Promise.reject(error); + throw error; } ); };