Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors: hide source line if longer than 150 chars #4487

Merged
merged 1 commit into from
Mar 25, 2020

Conversation

kevinkassimo
Copy link
Contributor

Closes #4255

Simply do not show the source line if error line too long, see reasoning #4255 (comment)

The original script now does not show the huge source line to stderr:

$ ./target/debug/deno https://raw.githubusercontent.com/Sharpiro/bugs/0d41bbe0d3ee8cf2e052cbc76d7f00b917a933fd/deno/large_errors/index.js
error: Uncaught ReferenceError: document is not defined
► https://cdn.jsdelivr.net/gh/sharpiro/wabt.js@3c13807f1008e4451544a90fc108e8307cc5fc80/index.js:8:2742
    at https://cdn.jsdelivr.net/gh/sharpiro/wabt.js@3c13807f1008e4451544a90fc108e8307cc5fc80/index.js:8:2742
    at https://raw.githubusercontent.com/Sharpiro/bugs/0d41bbe0d3ee8cf2e052cbc76d7f00b917a933fd/deno/large_errors/index.js:13:20

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit 3d228f5 into denoland:master Mar 25, 2020
dubiousjim added a commit to dubiousjim/deno that referenced this pull request Mar 29, 2020
* denoland/master: (35 commits)
  Ignore flaky test cafile_info (denoland#4517)
  fix(inspector): proper error message on port collision (denoland#4514)
  feat: Added colors to doc output (denoland#4518)
  v0.38.0
  feat: Add "deno doc" subcommand (denoland#4500)
  Update to Prettier 2 and use ES Private Fields (denoland#4498)
  upgrade: dprint 0.9.6 (denoland#4509)
  upgrade: rusty_v8 to v0.3.9 (denoland#4505)
  feat: Support Inspector / Chrome Devtools (denoland#4484)
  Improve isatty and kill API docs; Deno.kill() - throw on Windows (denoland#4497)
  refactor: rename ConsoleOptions to InspectOptions (denoland#4493)
  upgrade: dprint 0.9.5 (denoland#4491)
  feat: window.close() (denoland#4474)
  errors: replace .lines with explicit .split newline (denoland#4483)
  doc: improve various API docs and include examples (denoland#4486)
  hide source line if error message longer than 150 chars (denoland#4487)
  fix: add fsEvent notify::Error casts (denoland#4488)
  feat: add queueMicrotask to d.ts (denoland#4477)
  Revert "avoid using same port number for test (denoland#4147)"
  docs: update manual about how to run tests for std (denoland#4462)
  ...
dubiousjim added a commit to dubiousjim/deno that referenced this pull request Mar 29, 2020
* denoland/master:
  Ignore flaky test cafile_info (denoland#4517)
  fix(inspector): proper error message on port collision (denoland#4514)
  feat: Added colors to doc output (denoland#4518)
  v0.38.0
  feat: Add "deno doc" subcommand (denoland#4500)
  Update to Prettier 2 and use ES Private Fields (denoland#4498)
  upgrade: dprint 0.9.6 (denoland#4509)
  upgrade: rusty_v8 to v0.3.9 (denoland#4505)
  feat: Support Inspector / Chrome Devtools (denoland#4484)
  Improve isatty and kill API docs; Deno.kill() - throw on Windows (denoland#4497)
  refactor: rename ConsoleOptions to InspectOptions (denoland#4493)
  upgrade: dprint 0.9.5 (denoland#4491)
  feat: window.close() (denoland#4474)
  errors: replace .lines with explicit .split newline (denoland#4483)
  doc: improve various API docs and include examples (denoland#4486)
  hide source line if error message longer than 150 chars (denoland#4487)
  fix: add fsEvent notify::Error casts (denoland#4488)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deno creating huge error messages from auto-generated JS
2 participants