The compiler dutifully informed me that:
case error_logger:logfile({open, ?IMP_LOGFILE} ) of
was giving out:
/imp_scan.erl:137: syntax error before: '}'
...and boy did I end up scratching my head until finally, applying Rule #1 (you spelled it wrong) coupled with the Holmes conjecture I realised that (a) I was indeed wrong again and (b) the compiler was correct and here was the problem:
-define(IMP_LOGFILE,"/tmp/impscan.log"}).
Yes, having decided that the string was best made a constant I refactored the code and accidentally left the trailing closing brace in the macro, hence my confusion! The error message was referring to that brace but because the parameter was itself a tuple I had become confused. Just another day on the job.
PS: As I like to call it, the "Holmes conjecture",
How often have I said to you that when you have eliminated the impossible, whatever remains, however improbable, must be the truth?.
Comments
Post a Comment