-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Proper error message when verification fails. #9
Comments
Hey, The problem is that when "output file had a different extension then the default" fs.stat( path.join(
project.workpath,
project.resultname
), (err, stats) => {
if (err || !stats || stats.size < 1) {
getLogs(project, (logs) => {
return reject(logs);
})
... The intention of this piece of code, was to verify that outputted file is the one which we were expecting at the beginning (setting But now, i'm thinking: maybe this validation part don't even needed...I don't know.
Might be something looking like that: if (err) {
return reject(err);
} else if (!stats || stats.size < 1) {
getLogs(project, (logs) => {
return reject(logs);
})
} |
Indeed, that might probably be the best way to handle it and provide the user with a more clear error message. Great. Btw, your framework is pretty cool! Thank you for all the effort that you put into it! |
Implemented this changed in the project, and pushed new version to npm. |
Hi,
the verify task had me dumbfounded for a while as i was checking the results in the db.json errorMessage field and couldn't find anything going wrong. The problem was that the output file had a different extension then the default. Perhaps the "return reject(logs);" can be extended with a clear message that the resulting file couldn't be found with a path to the filename. I was looking how to implement this on my own and provide a changeset, but I didn't quite know what the best solution was to fit in your framework. Probably it is as simple as adding a string to the 'logs' variable. If that's fine with you i could even provide a changeset for merging.
The text was updated successfully, but these errors were encountered: