a simplified version of c++ abi for exception handling