Explorar el Código

Add a 'ServiceNotConfiguredError' to Errors module.

Shane Kilkelly hace 9 años
padre
commit
8a8a5a7079
Se han modificado 1 ficheros con 10 adiciones y 1 borrados
  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