Email notification for every error raised

Hello, do you know how can I set email notifications for every Issue created? (exception raised on my code)