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

collins-error

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collins-error - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

4

libs/error.js

@@ -56,3 +56,5 @@ 'use strict';

let details = { details: error.message };
return new CoreError(type, details);
let convertedError = new CoreError(type, details);
convertedError.stack = error.stack;
return convertedError;
}

@@ -59,0 +61,0 @@ }

{
"name": "collins-error",
"version": "1.0.0",
"version": "1.1.0",
"description": "Custom error class used by the collins system",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -36,7 +36,10 @@ 'use strict';

});
let convertedError = CoreError.convert('TestError', foreignError);
it('should convert Error into CoreError', () => {
let convertedError = CoreError.convert('TestError', foreignError);
Assert.equal(convertedError instanceof CoreError, true);
});
it('should transfer stack trace to new error object', () => {
Assert.equal(convertedError.stack, foreignError.stack);
});
});
});
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