bem / bem/bem-xjst

Provide more informative error message

Open
#265 1 comment 1 reaction 0 assignees View on GitHub
scope: debuggability semver: patch status: ready
Dominant language
JavaScript
Stars
117
Forks
48
PR merge metrics
No merged PRs in 30d

Description

Now when there's `applyNext()` in template body not wrapped in `function() {}` error message and stack trace are far from useful:

```
BEMHTML error: Cannot read property 'exec' of null
TypeError: Cannot read property 'exec' of null
```

Live example: https://goo.gl/Oiuy8q

Contributor guide

Open the contributing guide

Research direction

Reproduce the live example with applyNext() directly in a template body and inspect the error-handling path that produces the current BEMHTML error and stack trace. Done means the invalid usage reports a specific, informative error with a useful stack trace.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.