LAST_ERROR extra CRLF - Possible bug

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kh_kevin
Junior Coder
Posts: 34
Joined: Mon Nov 12, 2012 8:30 am

LAST_ERROR extra CRLF - Possible bug

Post by kh_kevin » Wed Nov 28, 2012 9:49 am

Hello,

Just wanted to bring to your attention there might be an extra CRLF right before the last ")" in LAST_ERROR when an error gets trapped.

I always have a hanging ")" no matter what the error is.
Message: Error Executing thiswillnotwork.exe (2:The system cannot find the file specified.
)

Message: Error Executing thk.exe (2:The system cannot find the file specified.
)

Thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Nov 28, 2012 10:44 am

Looks like this is just with the RunProgram function right?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

kh_kevin
Junior Coder
Posts: 34
Joined: Mon Nov 12, 2012 8:30 am

Post by kh_kevin » Wed Nov 28, 2012 11:02 am

Yes that's w/RunProgram. I wanted to test another error but I couldn't seem to find an easy way to create an error off the top of my head!

kh_kevin
Junior Coder
Posts: 34
Joined: Mon Nov 12, 2012 8:30 am

Post by kh_kevin » Wed Nov 28, 2012 11:08 am

Looks like this one is fine, but there is no error number:
Message: Subroutine/Label blah Not Found!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Nov 28, 2012 11:14 am

It doesn't need an error number.

The number returned by the Run Program error is the system error code that Windows is reporting related to trying to execute a file (e.g. it could be that the file wasn't found, or it was in use or .... hence a system error code is returned to define WHAT the error was).

In the case of a label not exisiting it either exists or it doesn't. Windows doesn't get involved. So the error is different. There is no system error code for a Macro Scheduler label not existing.

Anyway, it looks like this extra CRLF issue is confined to the runprogram command and related to the way the system error message is being formatted. It has been noted.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

kh_kevin
Junior Coder
Posts: 34
Joined: Mon Nov 12, 2012 8:30 am

Post by kh_kevin » Wed Nov 28, 2012 11:20 am

Great, didn't mean to imply there should be an error number but good to know how it works. Thanks,

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts