![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
trace-error
Advanced tools
npm install trace-error --save
import TraceError from 'trace-error';
global.TraceError = TraceError; // expose globally (optional)
(async () => {
try {
await fetch('google.com');
} catch(e) {
console.error(new TraceError('Failed to fetch content', e));
}
})();
TraceError: Failed to fetch content
at _construct (.../TraceError.js/dist/Exception.js:35:393)
at TraceError.Exception (.../TraceError.js/dist/Exception.js:110:17)
at new TraceError (.../TraceError.js/dist/TraceError.js:186:74)
at .../TraceError.js/tests/throw-test.js:159:19
at Object.<anonymous> (.../TraceError.js/tests/throw-test.js:161:3)
ReferenceError: fetch is not defined
at .../TraceError.js/tests/throw-test.js:157:5
at Object.<anonymous> (.../TraceError.js/tests/throw-test.js:161:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
Node >= 4.0; not tested on browsers
TraceError#cause(index = 0)
Get the cause at the specified index
TraceError#causes()
Get a list of all the causes
TraceError@stack
Get the long stack (base error with chained cause errors)
TraceError@messages
Get a list of all the messages
static TraceError@globalStackProperty
Attribute used to aggregate the long stack. Can be further customized via. inheritance and/or prototype modification
static TraceError@indent
Spaces used to indent long stack
More detailed examples are in the /tests
folder
Extend the TraceError as such in order to maximize compatibility with ES5; additionally, override the toJSON
as necessary
export class MyAppTraceError extends TraceError {
constructor(...args) {
super(...args);
// not ideal
Object.defineProperty(this, 'stack', {
get: () => super.stack
});
}
}
FAQs
Chained errors for JavaScript
We found that trace-error demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.