dist/okanjo-metrics.js
/**
         * Reports an error to the console and possibly Raven in the future
         * @param args
         */
Reports an error to the console and possibly Raven in the future
@param args
Reports an error to the console and possibly Raven in the future @param args
function report() {
            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }
            var err = args.find(function (arg) {
                return arg instanceof Error;
            });
            if (!err) {
                var messageIndex = args.findIndex(function (arg) {
                    return typeof arg === "string";
                });
                err = new Error(args[messageIndex] || "Okanjo Error");
                if (messageIndex >= 0) args.splice(messageIndex, 1);
            } else {
                var stack = new Error().stack.split('\n');
                stack.shift();
                stack.shift();
                args.push({ reportStack: stack.join('\n') });
                args = args.filter(function (a) {
                    return a !== err;
                });
            }
            Console.error('[Okanjo v' + okanjo.version + ']: ' + err.stack);
            args.length && Console.error.apply(Console, ['Additional information:'].concat(args));
        }
function report ( ) { for ( var _len = arguments . length , args = Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) { args [ _key ] = arguments [ _key ] ; } var err = args . find ( function ( arg ) { return arg instanceof Error ; } ) ; if ( ! err ) { var messageIndex = args . findIndex ( function ( arg ) { return typeof arg === "string" ; } ) ; err = new Error ( args [ messageIndex ] || "Okanjo Error" ) ; if ( messageIndex >= 0 ) args . splice ( messageIndex , 1 ) ; } else { var stack = new Error ( ) . stack . split ( '\n' ) ; stack . shift ( ) ; stack . shift ( ) ; args . push ( { reportStack : stack . join ( '\n' ) } ) ; args = args . filter ( function ( a ) { return a !== err ; } ) ; } Console . error ( '[Okanjo v' + okanjo . version + ']: ' + err . stack ) ; args . length && Console . error . apply ( Console , [ 'Additional information:' ] . concat ( args ) ) ; }
Reports an error to the console and possibly Raven in the future
 @param args
Reports an error to the console and possibly Raven in the future @param args
// Grow our own stack so we can figure out what async thing did it // TODO - integrate with Raven