1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

fix(runtime): return error instead of panicking for windows signals (#11940)

This commit is contained in:
Casper Beyer 2021-09-07 23:34:46 +08:00 committed by GitHub
parent 2c2e3ec1ca
commit d85ccce65b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"))
}