Log warnings in certain unexpected branches
This commit is contained in:
parent
a1d676779d
commit
408457e7ce
|
@ -78,7 +78,7 @@ bool GameState::moveCardToColumn(int columnId)
|
|||
assert(columnId >= 0 && columnId < 7);
|
||||
|
||||
if (m_throwawayPile.isEmpty()) {
|
||||
// Consider raising an exception here instead
|
||||
qWarning() << "Attempted to move thrown card to column with empty throwaway pile";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ bool GameState::moveCardToColumn(int columnId)
|
|||
bool GameState::moveThrownCardToFoundation(PlayingCard::Suit foundationId)
|
||||
{
|
||||
if (m_throwawayPile.isEmpty()) {
|
||||
// Consider raising an exception here instead
|
||||
qWarning() << "Attempted to move thrown card to foundation with empty throwaway pile";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ bool GameState::moveColumnCardToFoundation(int columnId, PlayingCard::Suit found
|
|||
assert(columnId >= 0 && columnId < 7);
|
||||
|
||||
if (m_columns[columnId].isEmpty()) {
|
||||
// Consider raising an exception here instead
|
||||
qWarning() << "Attempted to move card to foundation from an empty column";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue