Skip to content

Commit 7487209

Browse files
committed
Require an error message when throwing InvalidPropertyValue exception.
1 parent 672356f commit 7487209

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)