Socket
Socket
Sign inDemoInstall

@spinajs/exceptions

Package Overview
Dependencies
Maintainers
1
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/exceptions - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

17

lib/index.d.ts

@@ -5,7 +5,10 @@ /**

export declare class Exception extends Error {
inner?: Error;
/**
* Constructs new exception with message
*
* @param message - error message
* @param inner - inner exception ( eg. original couse of error )
*/
constructor(message?: string);
constructor(message?: string, inner?: Error);
}

@@ -23,2 +26,7 @@ /**

/**
* Exception thrown when config option is invalidl eg. missing or in invalid format
*/
export declare class InvalidOption extends Exception {
}
/**
* The exception that is thrown when a method call is invalid for the object's current state.

@@ -72,9 +80,2 @@ */

*/
export declare class ValidationFailed extends Exception {
parameter: any;
constructor(message: string, validationErrors: any);
}
/**
* The exception that is thrown when JSON entity is checked against schema and is invalid
*/
export declare class JsonValidationFailed extends Exception {

@@ -81,0 +82,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExpectedResponseUnacceptable = exports.JsonValidationFailed = exports.ResourceDuplicated = exports.UnexpectedServerError = exports.MethodNotImplemented = exports.ResourceNotFound = exports.IOFail = exports.Forbidden = exports.BadRequest = exports.AuthenticationFailed = exports.InvalidOperation = exports.InvalidOption = exports.InvalidArgument = exports.NotSupported = exports.Exception = void 0;
/**

@@ -9,6 +10,9 @@ * Base class of all exceptions in framework

* Constructs new exception with message
*
* @param message - error message
* @param inner - inner exception ( eg. original couse of error )
*/
constructor(message) {
constructor(message, inner) {
super(message);
this.inner = inner;
}

@@ -30,2 +34,8 @@ }

/**
* Exception thrown when config option is invalidl eg. missing or in invalid format
*/
class InvalidOption extends Exception {
}
exports.InvalidOption = InvalidOption;
/**
* The exception that is thrown when a method call is invalid for the object's current state.

@@ -88,12 +98,2 @@ */

*/
class ValidationFailed extends Exception {
constructor(message, validationErrors) {
super(message);
this.parameter = validationErrors;
}
}
exports.ValidationFailed = ValidationFailed;
/**
* The exception that is thrown when JSON entity is checked against schema and is invalid
*/
class JsonValidationFailed extends Exception {

@@ -100,0 +100,0 @@ }

{
"name": "@spinajs/exceptions",
"version": "1.0.4",
"version": "1.0.5",
"description": "exceptions definitions used all across framework modules",

@@ -15,3 +15,3 @@ "main": "lib/index.js",

"lint": "tslint -p tsconfig.json",
"prepublishOnly": "",
"prepublishOnly": "npm run lint",
"preversion": "npm run lint",

@@ -46,2 +46,4 @@ "version": "npm run format && git add -A src",

"@types/lodash": "^4.14.136",
"@types/mocha": "^5.2.7",
"@types/sinon": "^7.0.13",
"chai": "^4.2.0",

@@ -52,4 +54,6 @@ "chai-as-promised": "^7.1.1",

"prettier": "^1.18.2",
"sinon": "^7.3.2",
"ts-mocha": "^6.0.0",
"ts-node": "^8.3.0",
"tslint": "^5.20.1",
"tslint-circular-dependencies": "^0.1.0",

@@ -60,4 +64,4 @@ "tslint-config-prettier": "^1.18.0",

"typedoc": "^0.14.2",
"typescript": "^3.5.3"
"typescript": "^4.2.3"
}
}

Sorry, the diff of this file is not supported yet

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