Add code for exception demo