Skip to content

Commit

Permalink
error context
Browse files Browse the repository at this point in the history
  • Loading branch information
wvpm committed Jan 26, 2025
1 parent 6a1c16f commit 8974b7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/openvic-simulation/pop/Pop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void Pop::update_gamestate(
return; \
} \
if (amount < 0) { \
Logger::error("Adding negative ", #name, " to pop."); \
Logger::error("Adding negative ", #name, " of ",amount," to pop."); \
return; \
} \
name += amount;\
Expand All @@ -241,11 +241,11 @@ DO_FOR_ALL_TYPES_OF_POP_INCOME(DEFINE_ADD_INCOME_FUNCTIONS)
name += amount;\
expenses += amount;\
if (expenses < 0) { \
Logger::error("Total expenses became negative after adding ", #name, " to pop."); \
Logger::error("Total expenses became negative after adding ", #name, " of ",amount," to pop."); \
} \
cash -= amount;\
if (cash < 0) { \
Logger::error("Total cash became negative after adding ", #name, " to pop."); \
Logger::error("Total cash became negative after adding ", #name, " of ",amount," to pop."); \
} \
}

Expand Down

0 comments on commit 8974b7d

Please sign in to comment.