Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle IOException in DB module if file doesn't exist #42

Open
yutotakano opened this issue Aug 12, 2021 · 0 comments
Open

Handle IOException in DB module if file doesn't exist #42

yutotakano opened this issue Aug 12, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@yutotakano
Copy link
Collaborator

The CSV module logs an error and returns an empty list if the target file doesn't for read. However, the DB module blindly calls BS.readFile and is prone to throwing an IOException if the file doesn't exist.

Real life case being if status.json doesn't exist on start up (which is sure to happen on the first time), the bot will fail to start at all. The status file should be either created empty, or ignored and operation continued.

@yutotakano yutotakano added the bug Something isn't working label Aug 12, 2021
@yutotakano yutotakano added this to Ideas in the cloud in General Development via automation Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
General Development
  
Ideas in the cloud
Development

No branches or pull requests

1 participant