瀏覽代碼

Add a 'ServiceNotConfiguredError' to Errors module.

Shane Kilkelly 9 年之前
父節點
當前提交
8a8a5a7079
共有 1 個文件被更改,包括 10 次插入 和 1 次删除
  1. 10 1
      services/web/app/coffee/Features/Errors/Errors.coffee

+ 10 - 1
services/web/app/coffee/Features/Errors/Errors.coffee

@@ -5,5 +5,14 @@ NotFoundError = (message) ->
 	return error
 NotFoundError.prototype.__proto__ = Error.prototype
 
+
+ServiceNotConfiguredError = (message) ->
+	error = new Error(message)
+	error.name = "ServiceNotConfiguredError"
+	error.__proto__ = ServiceNotConfiguredError.prototype
+	return error
+
+
 module.exports = Errors =
-	NotFoundError: NotFoundError
+	NotFoundError: NotFoundError
+	ServiceNotConfiguredError: ServiceNotConfiguredError