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.6 to 0.1.0-alpha.8

34

lib/Exception.js

@@ -25,8 +25,8 @@ const UNKNOWN_FUNCTION = '?';

*/
this.message = message;
if ('function' === typeof Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = (new Error(message)).stack;
}
this._message = message;
Error.captureStackTrace(this, this.constructor);
this._originalStack = this.stack.split('\n').slice(2).join('\n');
delete this.message;
}

@@ -43,2 +43,15 @@

set message(message) {
this._message = message;
this._updateStack();
}
get message() {
return this._message;
}
_updateStack() {
this.stack = this.constructor.name + ': ' + this.message + '\n\n' + this._originalStack;
}
/**

@@ -52,7 +65,6 @@ * Parses a stack trace from an error instance.

static parseStackTrace(error) {
const regex = /^\s*at (?:((?:\[object object])?\S+(?: \[as \S+])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;
let lines = error.stack.split('\n'),
stack = [],
parts,
element;
const regex = /^\s*at (?:((?:\[object object])?\S+(?: \[as \S+])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i,
lines = error.stack.split('\n'),
stack = [];
let parts, element;

@@ -59,0 +71,0 @@ for (let i = 0, j = lines.length; i < j; ++i) {

{
"name": "@jymfony/exceptions",
"version": "0.1.0-alpha.6",
"version": "0.1.0-alpha.8",
"description": "Jymfony exception (core package)",
"main": "index.js",
"scripts": {
"test": "node ./tests.js test/**",
"coverage": "istanbul cover ./tests.js test/**"
"test": "node ./tests.js test/**"
},

@@ -22,3 +21,2 @@ "keywords": [

"chai": "^3.5.0",
"istanbul": "^0.4",
"mocha": "^3.0"

@@ -25,0 +23,0 @@ },

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