Wouldn't this achieve the same effect as writing the message into a text file and then checking for that if the error-dump file exists?