Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Undefined error when using .get() #134

Copy link
Copy link
@david-coxon

Description

@david-coxon
Issue body actions

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");
                    });
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.