ChicagoBoss/ChicagoBoss — pull request #450 by choptastic (2014-03-10 02:40:08+00:00)
Title: Code review pull request before pushing (few fixes and aesthetic things)

He folks.

Since I'm still new to the CB codebase, I don't want to just go ahead and start pushing away without first checking with the community. So I'm seeking some code-review on a handful of miscellaneous items (normally, I'd break PRs into one-per-issue, but I'm looking for overall thoughts here).

Attached is a PR containing a number of mostly non-related things:

1) Aesthetic change adding some helper instructions to the makefile (letting noobs know what to do next without having to refer to the docs)
2) Cleaning up after ErlyDTL compiling leaving .dtl.erl files (which may not be intentional by ErlyDTL, but I figured it can't hurt)
3) Typo fix
4) Fix an error related to ErlyDTL failing to compile a non-existent directory (was really manifesting itself trying to compile cb_admin against the current version, but another user noticed the error in another issue).
5) Possibly related to the ErlyDTL view failing to compile things, but I was getting an outright failure to return a response. Apparently the request was crashing during the handle_request when one of the specified files was not found (filelib:last_modified returns a 0, and calendar:datetime_to_gregorian_seconds was crashing when given a 0), so I fixed this: the conversion to gregorian seconds is (I'm pretty sure) not necessary at all (please correct if I'm overlooking something there), and also added a try-catch block to `handle_request`, which was what I needed in order to debug this, since, as I said, it was just failing silently, producing no crash or debug.

I'm thinking that the catch should still complete the request with something like "An unrecoverable error occurred", or if there's an error handling module that's used with crashes, please point me in the direction.

Anyway, let me hear your criticisms or concerns.

Thanks,

-Jesse