Improve BlenderDNA error message

This commit is contained in:
Turo Lamminen
2022-08-08 13:35:58 +03:00
parent a0f375162d
commit 2c1943cd10

View File

@@ -416,10 +416,10 @@ template <>
struct Structure::_defaultInitializer<ErrorPolicy_Fail> {
template <typename T>
void operator()(T & /*out*/, const char * = "") {
void operator()(T & /*out*/, const char *message = "") {
// obviously, it is crucial that _DefaultInitializer is used
// only from within a catch clause.
throw DeadlyImportError("Constructing BlenderDNA Structure encountered an error");
throw DeadlyImportError("Constructing BlenderDNA Structure encountered an error: ", message);
}
};