“Better than nothing” error handling

17 Oct 2009

In my current project for a client, we have a script that launches a web server. The final lines of its output looks like this. Sensitive information (to a paranoid client) has been edited out and the important parts are highlighted.

The script runs Apache httpd as the final step. In this configuration Apache requires the F: drive to be mapped to a specific network share. The nice thing about the script is that it tells you exactly that, so if you get the DocumentRoot must be a directory error you know what the problem is. (The fact that the error message itself is not very informative is Apache’s fault.)

Granted, it would be better if the Apache configuration didn’t need a specific network share to be mapped. Or at least that the script created the drive mapping automatically.

But this kind of simple error “handling” is so much better than not handling the problem at all, which would waste time as each developer would have to try to find out its cause without any hints.

blog comments powered by Disqus