Skip to content

Commit

Permalink
chore(path): Make a commonly triggered assert more verbose
Browse files Browse the repository at this point in the history
We see this assert triggered frequently, even sometimes in production,
so at least make it easier to track down the data involved.
  • Loading branch information
Geod24 committed Jul 13, 2024
1 parent e4be3e8 commit 665173f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/dub/internal/vibecompat/inet/path.d
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ struct NativePath {
ret.m_endsWithSlash = rhs.m_endsWithSlash;
ret.normalize(); // needed to avoid "."~".." become "" instead of ".."

assert(!rhs.absolute, "Trying to append absolute path.");
assert(!rhs.absolute, "Trying to append absolute path: " ~
this.toNativeString() ~ " ~ " ~ rhs.toNativeString());
foreach(folder; rhs.m_nodes){
switch(folder.toString()){
default: ret.m_nodes = ret.m_nodes ~ folder; break;
Expand Down

0 comments on commit 665173f

Please sign in to comment.