Author Topic: Using a macro for error parsing  (Read 6297 times)

mrothman

  • Senior Community Member
  • Posts: 122
  • Hero Points: 1
Using a macro for error parsing
« on: June 23, 2008, 06:16:18 PM »
I'm trying to use a macro for error parsing in a situation where the name of the error file is on a different line than the rest of the error info (line number, message, etc).  I'm following the instructions in the header of error.e. (SlickEdit v. 13.0.1.0, Linux).  Using the cool new macro debugger, I discovered that the code doesn't seem to be discovering the name of my macro from the ErrorRE.xml file.  When it gets to the line that gets the 'Macro' attribute from the xml file, the result is an empty string.

      _str macro = _xmlcfg_get_attribute(xml_handle, nodeIndex, 'Macro', '');  // line 2631 of error.e, after which macro = ""

If I use the debugger to force that string to the name of my macro, everything works great.  Anyone know why the xml attribute isn't found?  I thought maybe it has something to do with the schema, but I'm not an xml expert.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Using a macro for error parsing
« Reply #1 on: June 23, 2008, 06:57:13 PM »
You forgot to share your XML, it'll be hard for anyone to suggest what might be wrong with it without being able to see it.  ;)

mrothman

  • Senior Community Member
  • Posts: 122
  • Hero Points: 1
Re: Using a macro for error parsing
« Reply #2 on: June 23, 2008, 10:01:53 PM »
Good point, but it's looking more and more likely that this was an unrelated mistake on my part having to do with the upgrade to 13.  I had provided a SLICKEDITCONFIG env variable to point to my config directory (replacing the old VSLICKCONFIG), but hadn't quite grokked that SlickEdit creates a versioned directory underneath that in addition.  So, this problem probably is a function of making some of my changes in the base directory rather than the versioned one.

Thanks for the help anyway~

hs2

  • Senior Community Member
  • Posts: 2762
  • Hero Points: 292
Re: Using a macro for error parsing
« Reply #3 on: June 23, 2008, 10:06:41 PM »
Yep - got the same problem with a few of my macros. Use SLICKEDITCONFIGVERSION instead.
HS2