diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2019-04-16 15:13:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-16 15:13:42 -0400 |
| commit | 1bfb44336914a775cd01120165517394d30aec23 (patch) | |
| tree | 2f126b5f36ad8fe2ddd9cae118058affd413c68d /cli/errors.rs | |
| parent | 0c463582206881b6461742633a67f51632db614e (diff) | |
Implement async module loading in CLI (#2084)
Diffstat (limited to 'cli/errors.rs')
| -rw-r--r-- | cli/errors.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/errors.rs b/cli/errors.rs index 3873f70ff..bd3e7ba73 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -217,3 +217,13 @@ impl fmt::Display for RustOrJsError { } } } + +// TODO(ry) This is ugly. They are essentially the same type. +impl From<deno::JSErrorOr<DenoError>> for RustOrJsError { + fn from(e: deno::JSErrorOr<DenoError>) -> Self { + match e { + deno::JSErrorOr::JSError(err) => RustOrJsError::Js(err), + deno::JSErrorOr::Other(err) => RustOrJsError::Rust(err), + } + } +} |
