Handle errors with no stack correctly