Skip to content

Commit

Permalink
BadChangesetError and TransformError notify users to contact support (#…
Browse files Browse the repository at this point in the history
…6283)

* BadChangesetError and TransformError notify users to contact support
  • Loading branch information
danieltabacaru authored Feb 7, 2023
1 parent 5c34f92 commit 0ed74b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Enhancements
* <New feature description> (PR [#????](https://github.com/realm/realm-core/pull/????))
* None.
* IntegrationException's which require help from support team mention 'Please contact support' in their message ([#6283](https://github.com/realm/realm-core/pull/6283))

### Fixed
* <How do the end-user experience this issue? what was the impact?> ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?)
Expand Down
5 changes: 4 additions & 1 deletion src/realm/sync/changeset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ namespace sync {
using InternStrings = std::vector<StringBufferRange>;

struct BadChangesetError : ExceptionWithBacktrace<std::runtime_error> {
using ExceptionWithBacktrace<std::runtime_error>::ExceptionWithBacktrace;
BadChangesetError(const std::string& msg)
: ExceptionWithBacktrace<std::runtime_error>(util::format("%1. Please contact support", msg))
{
}
};

struct Changeset {
Expand Down
2 changes: 1 addition & 1 deletion src/realm/sync/transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ REALM_NORETURN void bad_merge(_impl::TransformerImpl::Side& side, Instruction::P
{
std::stringstream ss;
side.m_changeset->print_path(ss, instr.table, instr.object, instr.field, &instr.path);
bad_merge("%1 (instruction target: %2)", msg, ss.str());
bad_merge("%1 (instruction target: %2). Please contact support", msg, ss.str());
}

template <class LeftInstruction, class RightInstruction, class Enable = void>
Expand Down

0 comments on commit 0ed74b2

Please sign in to comment.