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

Better error message when bad filename is loaded #526

Closed
ry opened this Issue Aug 16, 2018 · 2 comments

Comments

2 participants
@ry
Collaborator

ry commented Aug 16, 2018

Currently the output looks like this

> ./out/release/deno badfile
TypeError: Cannot read property 'compileAndRun' of null
    at denoMain (deno/js/main.ts:90:7)
    at deno_main.js:1:1

It should look something like this:

> ./out/release/deno badfile
DoesNotExist: Cannot read file "badfile"
    at [frame]
    at [frame]

The proper fix forwards the error from rust. But I'll accept hacky solutions too as long as they include a TODO for the proper fix.

@ry ry added this to the v0.1 (first binary release) milestone Aug 16, 2018

ry added a commit that referenced this issue Aug 16, 2018

Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS.

Fixes #526.

ry added a commit that referenced this issue Aug 16, 2018

Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS.

Fixes #526.
@kitsonk

This comment has been minimized.

Show comment
Hide comment
@kitsonk

kitsonk Aug 18, 2018

Contributor

@ry currently in #518 it now outputs:

$ ./out/debug/deno foo.ts
Error: Cannot resolve module "foo.ts" from "/Users/kkelly/github/deno/".
    at assert (deno/js/util.ts:20:11)
    at DenoCompiler.run (deno/js/compiler.ts:316:5)
    at denoMain (deno/js/main.ts:77:12)
    at deno_main.js:1:1
Contributor

kitsonk commented Aug 18, 2018

@ry currently in #518 it now outputs:

$ ./out/debug/deno foo.ts
Error: Cannot resolve module "foo.ts" from "/Users/kkelly/github/deno/".
    at assert (deno/js/util.ts:20:11)
    at DenoCompiler.run (deno/js/compiler.ts:316:5)
    at denoMain (deno/js/main.ts:77:12)
    at deno_main.js:1:1
@ry

This comment has been minimized.

Show comment
Hide comment
@ry

ry Aug 18, 2018

Collaborator

awesome!

Collaborator

ry commented Aug 18, 2018

awesome!

ry added a commit that referenced this issue Aug 19, 2018

Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS.

Fixes #526.

ry added a commit that referenced this issue Aug 19, 2018

Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS.

Fixes #526.

ry added a commit that referenced this issue Aug 19, 2018

Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS.

Fixes #526.

ry added a commit that referenced this issue Aug 21, 2018

Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS.

Fixes #526.

ry added a commit that referenced this issue Aug 21, 2018

Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS

Fixes #526.

@ry ry closed this in 18d495c Aug 21, 2018

ry added a commit that referenced this issue Aug 22, 2018

Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS

Fixes #526.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment