From 4791fa72a9a70ff08c32c71ad81ca75846f025d2 Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Thu, 2 Apr 2015 14:10:22 -0700 Subject: [PATCH] Throw error instead of continuing when #api fails --- lib/cylon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cylon.js b/lib/cylon.js index 21e311c..a606b83 100644 --- a/lib/cylon.js +++ b/lib/cylon.js @@ -103,8 +103,8 @@ Cylon.api = function api(Server, opts) { ]; } - _.each(messages, _.arity(Logger.error, 1)); - return; + _.each(messages, _.arity(Logger.fatal, 1)); + throw new Error("Missing API plugin - cannot proceed"); } else { throw e; }