Skip to content

Commit 4321ac9

Browse files
committed
Replaced throw with default case string.
1 parent 3d50939 commit 4321ac9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/RhythmGameUtilities/Enums/Difficulty.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ std::string ToString(Difficulty difficulty)
3535
case Expert:
3636
return "Expert";
3737
default:
38-
throw std::invalid_argument("Unknown Difficulty");
38+
return "Unknown Difficulty";
3939
}
4040
}
4141

include/RhythmGameUtilities/Enums/NamedSection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ std::string ToString(NamedSection namedSection)
2828
case Events:
2929
return "Events";
3030
default:
31-
throw std::invalid_argument("Unknown NamedSection");
31+
return "Unknown NamedSection";
3232
}
3333
}
3434

include/RhythmGameUtilities/Enums/TypeCode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ std::string ToString(TypeCode typeCode)
3535
case EventMarker:
3636
return "E";
3737
default:
38-
throw std::invalid_argument("Unknown TypeCode");
38+
return "Unknown TypeCode";
3939
}
4040
}
4141

0 commit comments

Comments
 (0)