Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle CLI load into existing tables gracefully (PR #295)
- Add exception handling for SQLite, PostgreSQL, and MySQL. Sqlalchemy gives different exceptions for each database engine so I have seperated each exception for each engine. The error message passed by each engine is also different so that is checked as well. - Once the function gets one of those exceptions the following message is outputed and the program ends: `ERROR: Table 'TABLENAME' already exists in the database. Did you mean to use 'pokedex load -D'` - If the error is not that a table already exists, then the output will just be the full error from sqlalchemy. That way if someone runs into that error it can be reported as an issue and whoever can help would see the full error. --- Resolves part of issue #16
- Loading branch information