If you use the JavaScript helper (or any other helper except the html helper) in your default layout you may have noticed that error messages like “missing database table” are not shown. Olle presents in his answer to ticket 334 a simple but effective solution:

if (isset($javascript))
{
    echo $javascript->link("your_javascript"):
}