8000 Include context about what object caused the exception in OT by danieltabacaru · Pull Request #6203 · realm/realm-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Include context about what object caused the exception in OT #6203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 21, 2023

Conversation

danieltabacaru
Copy link
Collaborator
@danieltabacaru danieltabacaru commented Jan 16, 2023

What, How & Why?

We provide context about the objects causing exceptions when the instructions are applied, but there is no such information when exceptions occur during OT. This PR adds the table name and primary key value of the object in cause.

Fixes #6204.

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • C-API, if public C++ API changed.

@cla-bot cla-bot bot added the cla: yes label Jan 16, 2023
@danieltabacaru danieltabacaru marked this pull request as ready for review January 16, 2023 13:09
throw_bad_merge(util::format(msg, std::forward<Params>(params)...));
}

REALM_NORETURN void bad_merge(_impl::TransformerImpl::Side& side, Instruction::ObjectInstruction instr,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to have a bad_merge for PathInstructions too and log which property/path was being touched?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. It turns out that they were all PathInstruction's anyway.

@danieltabacaru danieltabacaru merged commit 4eea051 into master Jan 21, 2023
@danieltabacaru danieltabacaru deleted the dt/object_information_in_merge_errors branch January 21, 2023 16:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Bad changeset" errors should indicate primary key where applying change failed
2 participants
0