arr-ai / arrai

The ultimate data engine.
http://arr.ai
Apache License 2.0
20 stars 15 forks source link

Can't check if file exists before trying to load #594

Closed orlade-anz closed 4 years ago

orlade-anz commented 4 years ago

Please do not post any internal, closed source snippets on this public issue tracker!

Description

When trying to load a file that doesn't exist, eval fails without the chance to handle the failure.

Approaches

Without any error-handling mechanisms, a solution is to support checking the existence of a file before trying to load, allowing for fallback behaviour in the case that it doesn't exist.

Your Environment

$ arrai info
Version    : DIRTY-d03ea0505a101caec78cc198888b36efd520f73d (from v0.137.0)
Git commit : d03ea0505a101caec78cc198888b36efd520f73d
Date       : 2020-08-23T08:49:03Z
OS/arch    : darwin/amd64
Go version : go1.14.4 darwin/amd64