Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Deprecate/remove captureQuery #239

Merged
merged 1 commit into from
Dec 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,6 @@ extend(Raven.prototype, {
return eventId;
},

captureQuery: function captureQuery(query, engine, kwargs, cb) {
if (!cb && typeof kwargs === 'function') {
cb = kwargs;
kwargs = {};
} else {
kwargs = kwargs || {};
}

var eventId = this.generateEventId();
this.process(eventId, parsers.parseQuery(query, engine, kwargs), cb);

return eventId;
},

/* The onErr param here is sort of ugly and won't typically be used
* but it lets us write the requestHandler middleware in terms of this function.
* We could consider getting rid of it and just duplicating the domain
Expand Down Expand Up @@ -409,11 +395,15 @@ extend(Raven.prototype, {
return result;
},
captureError: function captureError() {
utils.consoleAlert('captureError has been deprecated and will be removed in v2.0');
utils.consoleAlert('captureError has been deprecated and will be removed in v2.0; use captureException instead');
return this.captureException.apply(this, arguments);
},
captureQuery: function captureQuery() {
utils.consoleAlert('captureQuery has been deprecated and will be removed in v2.0');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be removed

Doesn't this straight-up remove it? Why not keep the original implementation w/ this warning and remove in 2.0?

return this;
},
patchGlobal: function (cb) {
utils.consoleAlert('patchGlobal has been deprecated and will be removed in v2.0');
utils.consoleAlert('patchGlobal has been deprecated and will be removed in v2.0; use install instead');
registerExceptionHandler(this, cb);
return this;
},
Expand Down