1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00
Commit graph

10 commits

Author SHA1 Message Date
Tim Wang
07369a6270 Fix typo in errors.ts JSDoc 2018-12-13 15:36:15 -05:00
ztplz
b809a82fd9 Add missing copyrights (#1024) 2018-10-19 15:25:29 -04:00
Kitson Kelly
10a97679ac Align JSDoc to style guide. 2018-10-14 17:38:23 -04:00
Kitson Kelly
ffb41e61f1 Updates to js to clean up default library 2018-10-07 22:52:27 -04:00
Ryan Dahl
818ad37678 Rename fbs to msg. 2018-10-04 00:25:55 -04:00
Ryan Dahl
8090fb252b Expose deno.ErrorKind
Originally we planned to have a JS class for each error code. But it
seems better to just have a single DenoError class with a "kind"
property. One nice thing about using an enum instead of classes for
errors is that switch() can be used during error handling instead of a
bunch of instanceof branches.
2018-09-09 23:12:22 -04:00
Ryan Dahl
a4f1b367b9 Remove namespace from src/msg.fbs 2018-09-09 23:12:22 -04:00
Ryan Dahl
0d03fafbfe Map promises onto futures.
Refactors handlers.rs

The idea is that all Deno "ops" (aka bindings) should map onto
a Rust Future. By setting the "sync" flag in the Base message
users can determine if the future is executed immediately or put
on the event loop.

In the case of async futures, a promise is automatically created.
Errors are automatically forwarded and raised.

TODO:

- The file system ops in src/handler.rs are not using the thread pool
  yet. This will be done in the future using tokio_threadpool::blocking.
  That is, if you try to call them asynchronously, you will get a promise
  and it will act asynchronous, but currently it will be blocking.
- Handlers in src/handler.rs returned boxed futures. This was to make
  it easy while developing. We should try to remove this allocation.
2018-09-09 18:47:22 -04:00
Kitson Kelly
10dc71133a Mark APIs at internal and include JSDoc in types 2018-09-05 08:45:55 -04:00
Ryan Dahl
18d495c7d1 Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS

Fixes #526.
2018-08-21 15:37:45 -04:00