Add error messages on syntax errors

Piggybacking off of the doc help text generation to
create error messages on syntax errors.  Added a test that
shows this.