]> git.mxchange.org Git - flightgear.git/commitdiff
- output property path in error messages
authormfranz <mfranz>
Mon, 20 Jun 2005 18:53:00 +0000 (18:53 +0000)
committermfranz <mfranz>
Mon, 20 Jun 2005 18:53:00 +0000 (18:53 +0000)
src/Scripting/NasalSys.cxx

index 1c93b9cfcc8ff6cbdaaca3248070316b94f417e5..d999cc8cb2b7ef2913ab76de6c6350a078f75fdc 100644 (file)
@@ -471,13 +471,9 @@ naRef FGNasalSys::parse(const char* filename, const char* buf, int len)
 
 bool FGNasalSys::handleCommand(const SGPropertyNode* arg)
 {
-    // Parse the Nasal source.  I'd love to use the property name of
-    // the argument, but it's actually a *clone* of the original
-    // location in the property tree.  arg->getPath() returns an empty
-    // string.
     const char* nasal = arg->getStringValue("script");
     const char* moduleName = arg->getStringValue("module");
-    naRef code = parse("<command>", nasal, strlen(nasal));
+    naRef code = parse(arg->getPath(true), nasal, strlen(nasal));
     if(naIsNil(code)) return false;
 
     naRef locals = naNil();