raven
Advanced tools
Comparing version 0.10.0 to 0.11.0
@@ -0,1 +1,5 @@ | ||
# 0.11.0 - 5/5/2016 | ||
* `captureError` renamed to `captureException` to match raven-js (alias exists for backwards compat) | ||
* `parsers.parseError` now coerces Error type to string. [See #155] | ||
# 0.10.0 - 1/24/2016 | ||
@@ -2,0 +6,0 @@ * Now supports global context for extra data, tags, user [See #141] |
@@ -154,23 +154,23 @@ 'use strict'; | ||
proto.captureError = | ||
proto.captureException = function captureError(err, kwargs, cb) { | ||
if (!(err instanceof Error)) { | ||
// This handles when someone does: | ||
// throw "something awesome"; | ||
// We synthesize an Error here so we can extract a (rough) stack trace. | ||
err = new Error(err); | ||
} | ||
proto.captureException = function captureError(err, kwargs, cb) { | ||
if (!(err instanceof Error)) { | ||
// This handles when someone does: | ||
// throw "something awesome"; | ||
// We synthesize an Error here so we can extract a (rough) stack trace. | ||
err = new Error(err); | ||
} | ||
var self = this; | ||
if (!cb && typeof kwargs === 'function') { | ||
cb = kwargs; | ||
kwargs = {}; | ||
} else { | ||
kwargs = kwargs || {}; | ||
} | ||
parsers.parseError(err, kwargs, function(kw) { | ||
var result = self.process(kw); | ||
cb && cb(result); | ||
}); | ||
}; | ||
var self = this; | ||
if (!cb && typeof kwargs === 'function') { | ||
cb = kwargs; | ||
kwargs = {}; | ||
} else { | ||
kwargs = kwargs || {}; | ||
} | ||
parsers.parseError(err, kwargs, function(kw) { | ||
var result = self.process(kw); | ||
cb && cb(result); | ||
}); | ||
}; | ||
proto.captureError = proto.captureException; // legacy alias | ||
@@ -177,0 +177,0 @@ proto.captureQuery = function captureQuery(query, engine, kwargs, cb) { |
@@ -16,7 +16,8 @@ 'use strict'; | ||
utils.parseStack(err, function(frames) { | ||
var name = err.name + ''; | ||
if (typeof kwargs.message === 'undefined') { | ||
kwargs.message = err.name + ': ' + (err.message || '<no message>'); | ||
kwargs.message = name + ': ' + (err.message || '<no message>'); | ||
} | ||
kwargs.exception = [{ | ||
type: err.name, | ||
type: name, | ||
value: err.message, | ||
@@ -40,3 +41,3 @@ stacktrace: { | ||
kwargs.extra = kwargs.extra || {}; | ||
kwargs.extra[err.name] = extraErrorProps; | ||
kwargs.extra[name] = extraErrorProps; | ||
} | ||
@@ -171,2 +172,2 @@ | ||
return kwargs; | ||
}; | ||
}; |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"repository": "git://github.com/getsentry/raven-node.git", | ||
@@ -31,3 +31,3 @@ "author": "Matt Robenolt <matt@ydekproductions.com>", | ||
"cookie": "0.1.0", | ||
"lsmod": "~0.0.3", | ||
"lsmod": "1.0.0", | ||
"node-uuid": "~1.4.1", | ||
@@ -34,0 +34,0 @@ "stack-trace": "0.0.7" |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
98813
687
3
33
+ Addedlsmod@1.0.0(transitive)
- Removedlsmod@0.0.3(transitive)
Updatedlsmod@1.0.0