summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ2P <jjp5023@gmail.com>2018-10-11 00:15:47 +0900
committerRyan Dahl <ry@tinyclouds.org>2018-10-10 12:21:01 -0400
commit7cc9b64ff7be3744897de53adf898ca78e9a3a4e (patch)
tree50de904254fbd9c6f1cb852f391928c2d6cd81ab
parent930df1848af5dc6a6979fb8cc44ed2ad2ff23298 (diff)
Rename BadFileDescriptor
-rw-r--r--src/errors.rs5
-rw-r--r--src/msg.fbs2
-rw-r--r--src/ops.rs5
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,