Improve error handling of spec editor compilation.

PiperOrigin-RevId: 875703124
Change-Id: Idf4a90a48d75185ad03e4469cee9098104751d67
This commit is contained in:
Haroon Qureshi
2026-02-26 06:58:06 -08:00
committed by Copybara-Service
parent 19b583a421
commit 55d7226b06
2 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -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;
}
}