DevExpress / DevExpress/DevExtreme.AspNet.Data

Client-side script: If an error is thrown in a Deferred callback, this error doesn't appear in the console, which makes debugging more difficult

Open
#501 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

has-workaround
Dominant language
C#
Stars
165
Forks
140
Avg merge
1d 2h
Merged PRs (30d)
4

Description

CodePen example: https://codepen.io/pomah33/pen/MWrRKMb?editors=0010

If an error was thrown in Deferred callback, this error doesn't appear in console, which makes debugging more difficult

Error possibly was caused by this PR: https://github.com/DevExpress/DevExtreme.AspNet.Data/commit/6d973700bd28e4440aa05e267fb255202b87d395#diff-24d8a479ae56566c65690364aa2156fff7613fd38bd024153579f15d92b26f91L73, when deferred-like method .done was changed to promise-like .then

But on error in 'then' section of deferred (not promise) hides without appearing in console

Samples to try in dev console:

new Promise((resolve) => { window.r1 = resolve; }).then(() => { throw new Error('my error'); })
r1()
const d = new $.Deferred()
d.then(() => { throw new Error('my error'); })
d.resolve()

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CodePen example and the two console samples comparing native Promise.then with $.Deferred().then. Review the linked commit where .done changed to .then and trace how errors from the callback are handled. Done means an error thrown in a Deferred callback appears in the browser console.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.