diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-09-07 23:34:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 17:34:46 +0200 |
commit | d85ccce65bbaf0be6b55459847326f440d8676a1 (patch) | |
tree | 33bc0c1a3983db71cb2fdd8ec4bae6afc824514a /runtime/ops/signal.rs | |
parent | 2c2e3ec1ca47803f791ea72ea6247d8eedf87ec8 (diff) |
fix(runtime): return error instead of panicking for windows signals (#11940)
Diffstat (limited to 'runtime/ops/signal.rs')
-rw-r--r-- | runtime/ops/signal.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/ops/signal.rs b/runtime/ops/signal.rs index 40309657d..84beaf3c8 100644 --- a/runtime/ops/signal.rs +++ b/runtime/ops/signal.rs @@ -1,4 +1,6 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. +#[cfg(not(unix))] +use deno_core::error::generic_error; use deno_core::error::type_error; use deno_core::error::AnyError; use deno_core::op_async_unref; @@ -194,7 +196,7 @@ pub fn op_signal_bind( _args: (), _: (), ) -> Result<(), AnyError> { - unimplemented!(); + Err(generic_error("not implemented")) } #[cfg(not(unix))] @@ -203,7 +205,7 @@ fn op_signal_unbind( _args: (), _: (), ) -> Result<(), AnyError> { - unimplemented!(); + Err(generic_error("not implemented")) } #[cfg(not(unix))] @@ -212,5 +214,5 @@ async fn op_signal_poll( _args: (), _: (), ) -> Result<(), AnyError> { - unimplemented!(); + Err(generic_error("not implemented")) } |