Throw syntax errors instead of semantic errors upon compilation failure 

The errors I got were unintelligible. It turned out that the wrong diagnostics were retrieved. Typestring only throws an error when no output is generated, so the _syntactical_ diagnostics (`getSyntacticDiagnostics`) need to be retrieved instead of the _semantic_ diagnostics (`getSyntacticDiagnostics`).

Also, I propose to throw the whole array of syntax errors.