add conditional raise statement for testing error notifications