Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adonisjs/generic-exceptions

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adonisjs/generic-exceptions - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

5

CHANGELOG.md

@@ -0,1 +1,6 @@

<a name="2.0.1"></a>
## [2.0.1](https://github.com/adonisjs/adonis-generic-exceptions/compare/v2.0.0...v2.0.1) (2018-05-11)
<a name="2.0.0"></a>

@@ -2,0 +7,0 @@ # [2.0.0](https://github.com/adonisjs/adonis-generic-exceptions/compare/v1.0.0...v2.0.0) (2018-01-16)

6

package.json
{
"name": "@adonisjs/generic-exceptions",
"version": "2.0.0",
"version": "2.0.1",
"description": "List of generic exceptions to be used in all other repos",

@@ -11,3 +11,5 @@ "main": "index.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"lint": "standard",
"pretest": "npm run lint",
"test": "japa test.js"
},

@@ -14,0 +16,0 @@ "keywords": [

@@ -27,3 +27,3 @@ 'use strict'

* Missing config exception is thrown when configuration
* is not define for a given key
* is not defined for a given key
*

@@ -57,2 +57,16 @@ * @method missingConfig

}
/**
* This exception is raised when environment variable
* is not defined, but is required for app operation.
*
* @method missingEnvKey
*
* @param {String} environment variable name (e.g. `HOME` or `PATH`)
*
* @return {RuntimeException}
*/
static missingEnvKey (key) {
const message = `Make sure to define environment variable ${key}.`
return new this(message, 500, 'E_MISSING_ENV_KEY', this.repo)
}

@@ -59,0 +73,0 @@ /**

@@ -30,3 +30,3 @@ 'use strict'

GE.InvalidArgumentException.missingParameter('lucid', 'username', '2nd').message,
'E_MISSING_PARAMETER: Missing parameter username expected by lucid as 2nd parameter\n> More details: https://err.sh/adonisjs/errors/E_MISSING_PARAMETER'
'E_MISSING_PARAMETER: Missing parameter username expected by lucid method as 2nd parameter\n> More details: https://err.sh/adonisjs/errors/E_MISSING_PARAMETER'
)

@@ -50,2 +50,7 @@

assert.equal(
GE.RuntimeException.missingEnvKey('FOO').message,
'E_MISSING_ENV_KEY: Make sure to define environment variable FOO.\n> More details: https://err.sh/adonisjs/errors/E_MISSING_ENV_KEY'
)
assert.equal(
GE.RuntimeException.incompleteConfig(['foo'], 'bar').message,

@@ -52,0 +57,0 @@ 'E_INCOMPLETE_CONFIG: Make sure to define foo inside bar\n> More details: https://err.sh/adonisjs/errors/E_INCOMPLETE_CONFIG'

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc