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

@jymfony/exceptions

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jymfony/exceptions - npm Package Compare versions

Comparing version 0.1.0-alpha.9 to 0.1.0-alpha.10

lib/DomainException.js

3

index.js

@@ -0,4 +1,7 @@

Error.stackTraceLimit = Infinity;
require('./lib/Exception');
require('./lib/BadMethodCallException');
require('./lib/InvalidArgumentException');
require('./lib/DomainException');
require('./lib/LogicException');

@@ -5,0 +8,0 @@ require('./lib/OutOfBoundsException');

44

lib/Exception.js
const UNKNOWN_FUNCTION = '?';
class Exception extends Error {
constructor(message, code = null, previous = undefined) {
super(message);
/**
* @param {...} args
*/
constructor(...args) {
super();
delete this.message;
return this.__construct(...args);
}
/**
* Constructor.
*
* @param {string} message
* @param {int|null} [code = null]
* @param {Exception} [previous]
*/
__construct(message, code = null, previous = undefined) {
/**

@@ -28,5 +43,5 @@ * @type {string}

Error.captureStackTrace(this, this.constructor);
this._originalStack = this.stack.split('\n').slice(2).join('\n');
this._originalStack = this.stack.split('\n').join('\n');
delete this.message;
this._updateStack();
}

@@ -37,3 +52,3 @@

*
* @returns {[Object<string, string>]}
* @returns {Object.<string, string>[]}
*/

@@ -44,2 +59,12 @@ get stackTrace() {

/**
* @returns {string}
*/
get message() {
return this._message;
}
/**
* @param {string} message
*/
set message(message) {

@@ -50,6 +75,5 @@ this._message = message;

get message() {
return this._message;
}
/**
* @private
*/
_updateStack() {

@@ -64,3 +88,3 @@ this.stack = this.constructor.name + ': ' + this.message + '\n\n' + this._originalStack;

*
* @returns {[Object<string, string>]}
* @returns {Object.<string, string>[]}
*/

@@ -67,0 +91,0 @@ static parseStackTrace(error) {

{
"name": "@jymfony/exceptions",
"version": "0.1.0-alpha.9",
"version": "0.1.0-alpha.10",
"description": "Jymfony exception (core package)",

@@ -17,3 +17,3 @@ "main": "index.js",

"engines": {
"node": ">=6.0.0"
"node": ">=8.10.0"
},

@@ -20,0 +20,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

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