Skip to content

errors: display Deno version at the end of stacktraces on fatal exception that causes exit #12498

Closed
@theoludwig

Description

@theoludwig

Hey! 👋

Node.js v17.0.0 has been released, it includes this PR: nodejs/node#38332
It prints the Node.js version used on fatal exceptions that causes exit (that are not encapsulated by try/catch).

It could be a feature, that Deno could also do, it is easier for debugging so you don't have to ask "what version are you on?", it is directly in the error the user copy/paste from when asking for help.

Currently:
With a file app.ts :

throw new Error('Error...')

When we do deno run app.ts, it prints:

error: Uncaught Error: Error...
throw new Error('Error...')
      ^
    at file:///home/divlo/Documents/testing/test-ts/app.ts:1:7

What about something like this?

error: Uncaught Error: Error...
throw new Error('Error...')
      ^
    at file:///home/divlo/Documents/testing/test-ts/app.ts:1:7

Deno v1.15.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    suggestionsuggestions for new features (yet to be agreed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions