diff options
author | J2P <jjp5023@gmail.com> | 2018-10-11 00:15:47 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-10-10 12:21:01 -0400 |
commit | 7cc9b64ff7be3744897de53adf898ca78e9a3a4e (patch) | |
tree | 50de904254fbd9c6f1cb852f391928c2d6cd81ab /src | |
parent | 930df1848af5dc6a6979fb8cc44ed2ad2ff23298 (diff) |
Rename BadFileDescriptor
Diffstat (limited to 'src')
-rw-r--r-- | src/errors.rs | 5 | ||||
-rw-r--r-- | src/msg.fbs | 2 | ||||
-rw-r--r-- | src/ops.rs | 5 |
3 files changed, 3 insertions, 9 deletions
diff --git a/src/errors.rs b/src/errors.rs index ab6504e64..0f5320348 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -150,10 +150,7 @@ impl From<hyper::Error> for DenoError { } pub fn bad_resource() -> DenoError { - new( - ErrorKind::BadFileDescriptor, // TODO Rename to BadResource - String::from("bad resource id"), - ) + new(ErrorKind::BadResource, String::from("bad resource id")) } pub fn permission_denied() -> DenoError { diff --git a/src/msg.fbs b/src/msg.fbs index 16d10cdff..869452ced 100644 --- a/src/msg.fbs +++ b/src/msg.fbs @@ -67,7 +67,7 @@ enum ErrorKind: byte { Other, UnexpectedEof, - BadFileDescriptor, + BadResource, // url errors diff --git a/src/ops.rs b/src/ops.rs index f590a3bb5..3aad572bd 100644 --- a/src/ops.rs +++ b/src/ops.rs @@ -609,10 +609,7 @@ fn op_shutdown( let rid = inner.rid(); let how = inner.how(); match resources::lookup(rid) { - None => odd_future(errors::new( - errors::ErrorKind::BadFileDescriptor, - String::from("Bad File Descriptor"), - )), + None => odd_future(errors::bad_resource()), Some(mut resource) => { let shutdown_mode = match how { 0 => Shutdown::Read, |