@spinajs/exceptions
Advanced tools
Comparing version 2.0.185 to 2.0.186
@@ -15,2 +15,10 @@ /** | ||
/** | ||
* Exception with error code | ||
*/ | ||
export declare class ErrorCode extends Exception { | ||
code: number; | ||
data?: unknown; | ||
constructor(code: number, message?: string, data?: unknown); | ||
} | ||
/** | ||
* Exception thrown when functionality is not supported | ||
@@ -17,0 +25,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; | ||
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.ErrorCode = exports.Exception = void 0; | ||
/** | ||
@@ -21,2 +21,13 @@ * Base class of all exceptions in framework | ||
/** | ||
* Exception with error code | ||
*/ | ||
class ErrorCode extends Exception { | ||
constructor(code, message, data) { | ||
super(message); | ||
this.code = code; | ||
this.data = data; | ||
} | ||
} | ||
exports.ErrorCode = ErrorCode; | ||
/** | ||
* Exception thrown when functionality is not supported | ||
@@ -23,0 +34,0 @@ */ |
@@ -15,2 +15,10 @@ /** | ||
/** | ||
* Exception with error code | ||
*/ | ||
export declare class ErrorCode extends Exception { | ||
code: number; | ||
data?: unknown; | ||
constructor(code: number, message?: string, data?: unknown); | ||
} | ||
/** | ||
* Exception thrown when functionality is not supported | ||
@@ -17,0 +25,0 @@ */ |
@@ -17,2 +17,12 @@ /** | ||
/** | ||
* Exception with error code | ||
*/ | ||
export class ErrorCode extends Exception { | ||
constructor(code, message, data) { | ||
super(message); | ||
this.code = code; | ||
this.data = data; | ||
} | ||
} | ||
/** | ||
* Exception thrown when functionality is not supported | ||
@@ -19,0 +29,0 @@ */ |
{ | ||
"name": "@spinajs/exceptions", | ||
"version": "2.0.185", | ||
"version": "2.0.186", | ||
"description": "exceptions definitions used all across framework modules", | ||
@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143890
400