Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Root826027y@nickpapoutsis
I unnested an if (there were two checks that set flags; the inner had no reason to be nested), and it exposed a bug elsewhere in the code.
Literally:
If (not file x exists) {
Set validation.x.missing
If (not file y exists) {
Set validation.y.missing
}
} -
Root826027yI finally figured it out!
It was a capital V instead of a lowercase v. (and with my editor font, the difference between the two is very small.)
Details:
It was this line right here:
log.warning(Validation.message)
Several weeks ago when I coded this, i likely used autocomplete on "vali", and it autocompleted to "Validation" -- from one of my comments. The actual object is lowercase, meaning this line passed `undefined` to my logger... which apparently the logger can't handle. That value silently broke all subsequent logging from that controller, and also stopped code execution while the logging helper was waiting for the dead ipc call to finish.
yeesh. one freaking character!
I just changed a bunch of comments, log entries, and removed some blank lines from one of my controllers. Zero functional code changes. Everything worked before; now it runs only half the code, breaks, and throws strange errors.
Fucking hell.
Screw today.
undefined
maybe it'll work if i recompile
senseless violence