Add a test case for element binding when an exception is thrown
Merge pull request #2852 from Randy-Ma/unit_test

Add a test case for element binding when an exception is thrown