Skip to content

Commit

Permalink
Docs bump
Browse files Browse the repository at this point in the history
  • Loading branch information
fundead committed May 7, 2014
1 parent 7ad3ff4 commit eb8786a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 66 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Limited support is available for IE 8 and 9 - errors will only be saved if the r
## Release History
- 1.8.3 - Allow withCustomData to accept a function to provide a customdata object; fix undefined URL issue from Ajax; rm duplicated Tracekit ajax hook
- 1.8.2 - Fixed bug in Tracekit which caused 'Cannot call method indexOf' of undefined error
- 1.8.1 - Added meaningful message for Ajax errors, fixed debugmode logging bug
- 1.8.0 - Add Offline Saving feature; add support for WinJS
Expand Down
73 changes: 9 additions & 64 deletions dist/raygun.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v1.8.3 - 2014-05-05
/*! Raygun4js - v1.8.3 - 2014-05-08
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2014 MindscapeHQ; Licensed MIT */
;(function(window, undefined) {
Expand Down Expand Up @@ -1100,67 +1100,6 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
_helper('setInterval');
}());

/**
* Extended support for backtraces and global error handling for most
* asynchronous jQuery functions.
*/
(function traceKitAsyncForjQuery($) {

// quit if jQuery isn't on the page
if (!$) {
return;
}

var _oldEventAdd = $.event.add;
$.event.add = function traceKitEventAdd(elem, types, handler, data, selector) {
var _handler;

if (handler.handler) {
_handler = handler.handler;
handler.handler = TraceKit.wrap(handler.handler);
} else {
_handler = handler;
handler = TraceKit.wrap(handler);
}

// If the handler we are attaching doesn’t have the same guid as
// the original, it will never be removed when someone tries to
// unbind the original function later. Technically as a result of
// this our guids are no longer globally unique, but whatever, that
// never hurt anybody RIGHT?!
if (_handler.guid) {
handler.guid = _handler.guid;
} else {
handler.guid = _handler.guid = $.guid++;
}

return _oldEventAdd.call(this, elem, types, handler, data, selector);
};

var _oldReady = $.fn.ready;
$.fn.ready = function traceKitjQueryReadyWrapper(fn) {
return _oldReady.call(this, TraceKit.wrap(fn));
};

var _oldAjax = $.ajax;
$.ajax = function traceKitAjaxWrapper(s) {
var keys = ['complete', 'error', 'success'], key;
while(key = keys.pop()) {
if ($.isFunction(s[key])) {
s[key] = TraceKit.wrap(s[key]);
}
}

try {
return _oldAjax.call(this, s);
} catch (e) {
TraceKit.report(e);
throw e;
}
};

}(window.jQuery));

//Default options:
if (!TraceKit.remoteFetching) {
TraceKit.remoteFetching = true;
Expand Down Expand Up @@ -1320,7 +1259,9 @@ window.TraceKit = TraceKit;
send: function (ex, customData, tags) {
try {
processUnhandledException(_traceKit.computeStackTrace(ex), {
customData: merge(_customData, customData),
customData: typeof _customData === 'function' ?
merge(_customData(), customData) :
merge(_customData, customData),
tags: mergeArray(_tags, tags)
});
}
Expand Down Expand Up @@ -1503,7 +1444,11 @@ window.TraceKit = TraceKit;
}

if (isEmpty(options.customData)) {
options.customData = _customData;
if (typeof _customData === 'function') {
options.customData = _customData();
} else {
options.customData = _customData;
}
}

if (isEmpty(options.tags)) {
Expand Down
Loading

0 comments on commit eb8786a

Please sign in to comment.