Error Handling and Number Recognition

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Error Handling and Number Recognition

Post by mightycpa » Tue Oct 03, 2017 3:22 pm

I'm parsing through data, and I need to be able to identify numbers. I'm not real good with RegEx, so I thought I'd try something different and easy.

First, this REGEX pattern seems to work for me: ^[-+]?\d+(\.\d+)?$ -- I can use Google.

But now I'd like to know why my alternative method doesn't work:

Image
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

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

Re: Error Handling and Number Recognition

Post by Marcus Tettmar » Mon Oct 09, 2017 2:07 pm

123.avc is not a number, so trying to add 1 to it will cause an error.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Error Handling and Number Recognition

Post by mightycpa » Mon Oct 09, 2017 2:12 pm

Hi Marcus,

The question was more directed at why the IGNOREERRORS didn't work. I should have been clearer.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

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

Re: Error Handling and Number Recognition

Post by Marcus Tettmar » Mon Oct 09, 2017 3:04 pm

Oh. Will look at that. It certainly should do. If ignorerrors is not preventing it that must be a bug.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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

Re: Error Handling and Number Recognition

Post by Marcus Tettmar » Thu Oct 12, 2017 4:10 pm

Just to let you know that we now have this fixed in dev for the next update. The error was not being trapped by the regular error handler. That's now been fixed for the next release so that you can suppress/trap the error in the way you were expecting.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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