add the exception demo code