Fix support for single-value arrays with no trailing comma
Unify custom exceptions to be more like built-in SyntaxErrors