Improve error handling of spec editor compilation.
PiperOrigin-RevId: 875703124 Change-Id: Idf4a90a48d75185ad03e4469cee9098104751d67
This commit is contained in:
committed by
Copybara-Service
parent
19b583a421
commit
55d7226b06
@@ -78,7 +78,7 @@ void ModelHolder::PostInit() {
|
||||
if (spec_ && !model_) {
|
||||
model_ = mj_compile(spec_, &vfs_);
|
||||
if (!model_) {
|
||||
SetLoadError("Error compiling model from spec.");
|
||||
SetLoadError(mjs_getError(spec_));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user