mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
Rename BadFileDescriptor
This commit is contained in:
parent
930df1848a
commit
7cc9b64ff7
3 changed files with 3 additions and 9 deletions
|
@ -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 {
|
||||
|
|
|
@ -67,7 +67,7 @@ enum ErrorKind: byte {
|
|||
Other,
|
||||
UnexpectedEof,
|
||||
|
||||
BadFileDescriptor,
|
||||
BadResource,
|
||||
|
||||
// url errors
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue