Skip to content

Commit

Permalink
Correct check for exception
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Apr 2, 2019
1 parent 0d4aa21 commit 97b8d78
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/DropboxSDK.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ end



# TODO: Use a timer instead
const try_after = Ref(time())
function set_retry_delay(retry_after::Real)
@assert retry_after >= 0
Expand Down Expand Up @@ -209,7 +208,7 @@ function post_rpc(auth::Authorization,
println("Info: Retrying...")
continue
end
elseif (ex == ErrorException &&
elseif (ex isa ErrorException &&
startswith(ex.msg, "Unexpected end of input\nLine: 0\n"))
# I don't understand this error; maybe it is
# ephemeral? We will retry.
Expand Down Expand Up @@ -289,7 +288,7 @@ function post_content_upload(auth::Authorization,
println("Info: Retrying...")
continue
end
elseif (ex == ErrorException &&
elseif (ex isa ErrorException &&
startswith(ex.msg, "Unexpected end of input\nLine: 0\n"))
# I don't understand this error; maybe it is
# ephemeral? We will retry.
Expand Down Expand Up @@ -366,7 +365,7 @@ function post_content_download(auth::Authorization,
println("Info: Retrying...")
continue
end
elseif (ex == ErrorException &&
elseif (ex isa ErrorException &&
startswith(ex.msg, "Unexpected end of input\nLine: 0\n"))
# I don't understand this error; maybe it is
# ephemeral? We will retry.
Expand Down

0 comments on commit 97b8d78

Please sign in to comment.