Finding syntax errors when using getScript

Finding syntax errors when using getScript

When loading scripts with getScript, I find it difficult to find syntax errors that cause the load to fail. Is there a way to get the usual syntax error messages in this case?