Skip to content

Commit

Permalink
Update src/Color.cc
Browse files Browse the repository at this point in the history
Co-authored-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Avisheet Srivastava <[email protected]>
  • Loading branch information
Avisheet and azeey authored Mar 6, 2024
1 parent c7b287d commit 3582a56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Color.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ float& Color::operator[](const unsigned int _index)
}

std::cerr << "Trying to read index " << _index << " of Color" << std::endl;
throw std::runtime_error("Index Error: Color index out of range");
static float invalidValue = NAN_F;
return invalidValue;
}

//////////////////////////////////////////////////
Expand Down

0 comments on commit 3582a56

Please sign in to comment.