Skip to content

Undefined error when using .get() #134

Closed
@david-coxon

Description

@david-coxon

It seems the ErrorStackParser variable is undefined, throwing an error when required instead of generating a complete stacktrace when using the get method.

I'm not sure if the issue is my fault or not, some guidance would be appreciated.

Here's the..er..stacktrace of the error itself.

TypeError: Cannot read property 'parse' of undefined at Object.<anonymous> (http://localhost:3000/libs/stacktrace-js/stacktrace.js:79:51) 
at Object.StackTrace$$fromError [as fromError] (http://localhost:3000/libs/stacktrace-js/stacktrace.js:78:20) 
at Object.StackTrace$$get [as get] (http://localhost:3000/libs/stacktrace-js/stacktrace.js:63:33) 
at Object.processErrorCode 
...

And here's my code block that the issue originates from.

  StackTrace.get()
                    .then(function (stackframes) {
                        var stringifiedStack = stackframes.map(function (sf) {
                            return sf.toString();
                        }).join('\n');
                        Logger.getErrors().addMessage(errorMessage, stringifiedStack, "ErrorCode");
                    })
                    .catch(function (err) {
                        Logger.getErrors().addMessage(errorMessage, err.stack, "ErrorCode");
                    });

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