Skip to content
Snippets Groups Projects
Select Git revision
  • 5484556e2b8dd0a42f98750211a490f2bb337189
  • master default protected
2 results

DataConverter.java

Blame
  • raven.js 59.51 KiB
    /*! Raven.js 1.1.19 (b51bc89) | github.com/getsentry/raven-js */
    
    /*
     * Includes TraceKit
     * https://github.com/getsentry/TraceKit
     *
     * Copyright 2015 Matt Robenolt and other contributors
     * Released under the BSD license
     * https://github.com/getsentry/raven-js/blob/master/LICENSE
     *
     */
    ;(function(window, undefined){
    'use strict';
    
    /*
     TraceKit - Cross brower stack traces - github.com/occ/TraceKit
     MIT license
    */
    
    var TraceKit = {
        remoteFetching: false,
        collectWindowErrors: true,
        // 3 lines before, the offending line, 3 lines after
        linesOfContext: 7
    };
    
    // global reference to slice
    var _slice = [].slice;
    var UNKNOWN_FUNCTION = '?';
    
    
    /**
     * TraceKit.wrap: Wrap any function in a TraceKit reporter
     * Example: func = TraceKit.wrap(func);
     *
     * @param {Function} func Function to be wrapped
     * @return {Function} The wrapped func
     */
    TraceKit.wrap = function traceKitWrapper(func) {
        function wrapped() {
            try {
                return func.apply(this, arguments);
            } catch (e) {
                TraceKit.report(e);
                throw e;
            }
        }
        return wrapped;
    };
    
    /**
     * TraceKit.report: cross-browser processing of unhandled exceptions
     *
     * Syntax:
     *   TraceKit.report.subscribe(function(stackInfo) { ... })
     *   TraceKit.report.unsubscribe(function(stackInfo) { ... })
     *   TraceKit.report(exception)
     *   try { ...code... } catch(ex) { TraceKit.report(ex); }
     *
     * Supports:
     *   - Firefox: full stack trace with line numbers, plus column number
     *              on top frame; column number is not guaranteed
     *   - Opera:   full stack trace with line and column numbers
     *   - Chrome:  full stack trace with line and column numbers
     *   - Safari:  line and column number for the top frame only; some frames
     *              may be missing, and column number is not guaranteed
     *   - IE:      line and column number for the top frame only; some frames
     *              may be missing, and column number is not guaranteed
     *
     * In theory, TraceKit should work on all of the following versions: