Skip to content

Commit

Permalink
fix: Be more helpful when failing
Browse files Browse the repository at this point in the history
- Current message of "Error: Multiple versions of WarpDrive detected, the application will malfunction." is hard to action on as it does not give the user enough context on what it sees.
- Make it so that the user has _some_ idea what configuration made the app fail.
  • Loading branch information
MichalBryxi committed Sep 18, 2024
1 parent 91ca6b3 commit c787151
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core-types/src/-private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ const GlobalSink = GlobalRef[name];

if (DEBUG) {
if (GlobalSink.__version !== version) {
throw new Error('Multiple versions of WarpDrive detected, the application will malfunction.');
throw new Error(
`Multiple versions of WarpDrive detected (${GlobalSink.__version}, ${version}), the application will malfunction.`
);
}
}

Expand Down

0 comments on commit c787151

Please sign in to comment.