Skip to content

not working with chrome? Cannot parse given Error objectΒ #198

Open
@embryologist

Description

@embryologist
  window.onerror = function (msg, file, line, col, error) {
        StackTrace.fromError(error, line).then(callback).catch(errback);
    }
        var errback = function (err) {
            console.log(err.message);
    };
    var callback = function (stackframes) {
        var stringifiedStack = stackframes.map(function (sf) {
            return sf.toString();
        }).join('\n');
    };

Cannot parse given Error object
adding,

  window.onerror = function (msg, file, line, col, error) {
        StackTrace.fromError(error, line).then(callback).catch(errback);
    }
        var errback = function (err) {
            console.log(new Error("from onerror").stack);
    };
    var callback = function (stackframes) {
        var stringifiedStack = stackframes.map(function (sf) {
            return sf.toString();
        }).join('\n');
    };

Error: from onerror at errback (PatientRegistration:1590) at anonymous

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions