Skip to content

Commit 27b8a8e

Browse files
authored
Merge pull request #2172 from opensim-org/tkuchida-requireErrorMsgForInvalidPropertyValue
Require an error message when throwing InvalidPropertyValue exception
2 parents 2dfe92a + 7487209 commit 27b8a8e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

OpenSim/Common/AbstractProperty.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ class InvalidPropertyValue : public Exception {
4747
const std::string& func,
4848
const Object& obj,
4949
const std::string& propertyName,
50-
const std::string& errorMsg = "") :
50+
const std::string& errorMsg) :
5151
Exception(file, line, func, obj) {
5252
std::string msg = "Property '" + propertyName;
53-
msg += "' has an invalid value.";
54-
msg += (errorMsg.empty()) ? "\n" : ("\n(details: " + errorMsg + ").");
53+
msg += "' has an invalid value.\n(details: " + errorMsg + ").\n";
5554
addMessage(msg);
5655
}
5756
};

0 commit comments

Comments
 (0)