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

Error puked out when we should provide a useful message #458

Open
mjordan opened this issue Mar 9, 2018 · 0 comments
Open

Error puked out when we should provide a useful message #458

mjordan opened this issue Mar 9, 2018 · 0 comments
Labels

Comments

@mjordan
Copy link
Collaborator

mjordan commented Mar 9, 2018

When MIK can't find the input CSV file, it pukes something like this out to the user:

Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(M:\Le Soleil\Missing issues from VPL\Missing issues from VPL_Le Soleil
 de Colombie): failed to open stream: No such file or directory' in M:\mik_mark\vendor\league\csv\src\AbstractCsv.php:128
Stack trace:
#0 M:\mik_mark\vendor\league\csv\src\AbstractCsv.php(128): SplFileObject->__construct('M:\\Le Soleil\\Mi...', 'r+')
#1 M:\mik_mark\vendor\league\csv\src\Reader.php(263): League\Csv\AbstractCsv->getIterator()
#2 M:\mik_mark\vendor\league\csv\src\Reader.php(217): League\Csv\Reader->getRow(0)
#3 M:\mik_mark\vendor\league\csv\src\Reader.php(184): League\Csv\Reader->getAssocKeys(0)
#4 M:\mik_mark\src\fetchers\Csv.php(91): League\Csv\Reader->fetchAssoc()
#5 M:\mik_mark\src\fetchers\Csv.php(128): mik\fetchers\Csv->getRecords()
#6 M:\mik_mark\mik(131): mik\fetchers\Csv->getNumRecs()
#7 {main}
  thrown in M:\mik_mark\vendor\league\csv\src\AbstractCsv.php on line 128

How scary! We should provide a useful message saying something like "Can't find input CSV file specified in the [FETCHER] section of your configuration file."

@mjordan mjordan added the bug label Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant