Improve BlenderDNA error message

pull/4679/head
Turo Lamminen 2022-08-08 13:35:58 +03:00
parent a0f375162d
commit 2c1943cd10
1 changed files with 2 additions and 2 deletions

View File

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