Skip to content
Permalink
Browse files
Reword error message when input file doesn't exist; fixes #71
  • Loading branch information
quinnj committed Nov 22, 2020
1 parent 924c677 commit 9f805ba6fc8126364efb492a29010a353b005fb6
Showing 1 changed file with 2 additions and 2 deletions.
@@ -54,7 +54,7 @@ Tables.partitions(x::Stream) = x

Stream(io::IO, pos::Integer=1, len=nothing; convert::Bool=true) = Stream(Base.read(io), pos, len; convert=convert)
Stream(str::String, pos::Integer=1, len=nothing; convert::Bool=true) = isfile(str) ? Stream(Mmap.mmap(str), pos, len; convert=convert) :
throw(ArgumentError("$str is not a valid arrow file"))
throw(ArgumentError("$str is not a file"))

# will detect whether we're reading a Stream from a file or stream
function Stream(bytes::Vector{UInt8}, off::Integer=1, tlen::Union{Integer, Nothing}=nothing; convert::Bool=true)
@@ -177,7 +177,7 @@ Tables.getcolumn(t::Table, nm::Symbol) = lookup(t)[nm]
# high-level user API functions
Table(io::IO, pos::Integer=1, len=nothing; convert::Bool=true) = Table(Base.read(io), pos, len; convert=convert)
Table(str::String, pos::Integer=1, len=nothing; convert::Bool=true) = isfile(str) ? Table(Mmap.mmap(str), pos, len; convert=convert) :
throw(ArgumentError("$str is not a valid arrow file"))
throw(ArgumentError("$str is not a file"))

# will detect whether we're reading a Table from a file or stream
function Table(bytes::Vector{UInt8}, off::Integer=1, tlen::Union{Integer, Nothing}=nothing; convert::Bool=true)

0 comments on commit 9f805ba

Please sign in to comment.