-
Notifications
You must be signed in to change notification settings - Fork 172
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
Compilation errors are not handled properly #314
Comments
@XhmikosR Could you check this out please? This is a very annoying problem. And I have a fix ready for this, so almost no work from the maintainers required. |
I'm still waiting for @vladikoff to look at #322 and then we can check #315. |
Would love to see this one merged in. Bites me every time. Is there something outstanding any of us can help resolve or is this still waiting on @vladikoff? Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was running
grunt-contrib-watch
withgrunt-contrib-less
and other tasks, and I noticed that onlygrunt-contrib-less
was behaving strangely: if a compilation error was encountered, everything just hung up.After long search through
grount-contrib-watch
andgrunt
I am fairly certain that the problem lies with howgrunt-contrib-less
handles compilation errors.So in the
less
task there is acompileLess
function, which contains this code at the end:As you can see, in case of an error a message is printed, and then - because nothing is returned from the function in
catch
, the promise is fulfilled withundefined
.The next step is this then:
But it should be obvious by now that this throws an error, because
output
isundefined
(compileLess
was fulfilled with it) and we can't get thecss
property ofundefined
.Because there are no further error handlers, the error is just sent into nothingness and the
nextFileObj
function is not called. This seems like something that is not desired.I'm not sure what's the appropriate fix here. Would rethrowing the error be ok?
The text was updated successfully, but these errors were encountered: