log better errors to dashboard console when a panel's javascript throws an error