Test that device code is generated correctly even if exception are used for the host code.