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

Error handling to avoid exiting the dev-server, if error occurs. #16

Closed
saurabhdaware opened this issue May 24, 2020 · 7 comments
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@saurabhdaware
Copy link
Member

saurabhdaware commented May 24, 2020

Currently, if you're working in dev-server and an error occurs, let's say you write a variable that is undefined, In this case the dev-server is closed after throwing the error.

How to reproduce

  • abell serve after setting up this repo locally.
  • In demo/index.abell, write a variable that is not defined anywhere.
  • This will throw the error in terminal and will close the dev-server.

How it should work

  • It should throw error but should not exit the dev-server.

Code help

serve function handles the dev-server, if we add try-catch for error handling there, it should avoid exiting the server I believe.

@saurabhdaware saurabhdaware added bug Something isn't working good first issue Good for newcomers labels May 24, 2020
@saurabhdaware saurabhdaware added this to the v1.0.0 milestone May 24, 2020
@saurabhdaware saurabhdaware mentioned this issue Jun 7, 2020
8 tasks
@prafulla-codes
Copy link
Member

I think this issue is solved correct?

@saurabhdaware
Copy link
Member Author

It is only solved for the error when variable is undefined, Are there any other errors that can occur while working with Abell?

@prafulla-codes
Copy link
Member

If i try something like this, the web server throws an error, but the console shows nothing

{{
  const abc = require('./abac.json');
}}
{{ abc }}

Here there is no such file as abac.json

@prafulla-codes
Copy link
Member

Currently, if you're working in dev-server and an error occurs, let's say you write a variable that is undefined, In this case the dev-server is closed after throwing the error.

How to reproduce

  • npm run dev:serve after setting up this repo locally.
  • In demo/index.abell, write a variable that is not defined anywhere.
  • This will throw the error in terminal and will close the dev-server.

How it should work

  • It should throw error but should not exit the dev-server.

Code help

serve function handles the dev-server, if we add try-catch for error handling there, it should avoid exiting the server I believe.

Here the serve link is invalid can you change that?

@saurabhdaware
Copy link
Member Author

Fixed! Thanks

@saurabhdaware
Copy link
Member Author

If i try something like this, the web server throws an error, but the console shows nothing

{{
  const abc = require('./abac.json');
}}
{{ abc }}

Here there is no such file as abac.json

Oh yes we need to show proper error here

@saurabhdaware
Copy link
Member Author

Fixed in Abell v0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants