friendly error message on uncaught exception

@cos please review