impl exception stack for unix