browserify / browserify/node-util

util.inspect() on Errors does not include stack trace

Ouverte
#29 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
255
Forks
92
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

`util.inspect(new Error('foo'))` in Node prints the stack trace of the error:
```
Error: foo
at repl:1:15
at Script.runInThisContext (vm.js:122:20)
at REPLServer.defaultEval (repl.js:334:29)
at bound (domain.js:395:14)
at REPLServer.runBound [as eval] (domain.js:408:12)
at REPLServer.onLine (repl.js:641:10)
at REPLServer.emit (events.js:187:15)
at REPLServer.EventEmitter.emit (domain.js:441:20)
at REPLServer.Interface._onLine (readline.js:301:10)
at REPLServer.Interface._line (readline.js:673:8)
```
This shim however just returns
```
[Error: foo]
```
Which is really bad if this is used as part of a logging tool.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Locate the util.inspect() implementation and its handling of Error objects, then compare the shim's output with Node's output shown in the issue. Confirm that inspecting an Error includes its stack trace while preserving the expected message formatting.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, nodejs
Domaine
tooling
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.