revert adjustment of some test cases
Add some more test cases.
Throw original exception when the exception type is not defined in error code.