ACTION NOT TERMINATED. One or more Actions are not correctly terminated.

I’ve been working on one of the largest Actions I’ve created for a long time and I’ve been plagued with the ‘Action not terminated’ error for about a week now. I finally tracked down the error in the code (it was a simple ‘fat finger’ issue where I’d entered two double quotes rather than one). Needless to say it took an age to locate the problem. To make matters worse I had some code below the error line that resolved the mis-matched quotes which made locating the right line of code quite painful.

Does anyone have any hints or tips on how I can locate this sort of problem quickly in the future? I appreciate that Freeway considers the Action to be open ended and may not know where the error line is but I wonder if there is a better debugging solution than manually reading through all of the code line by line until I happen to see the error.
Thanks in advance,
Tim.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hey Tim, do you use any special software to write your actions?

I am a frequent offender when it comes to these types of malformations, and
while I’m not writing actions I’ll be writing javascript, css, or html.
Coda 2 gives me visual feedback when I’ve broken proper syntax, even when I
paste in something it usually highlights the unholy bit (or at least where
the wickedness starts). Anyway, just an idea.

Best, always…


Ernie Simpson

On Wed, Sep 25, 2013 at 8:28 AM, Tim Plumb email@hidden wrote:

I’ve been working on one of the largest Actions I’ve created for a long
time and I’ve been plagued with the ‘Action not terminated’ error for about
a week now. I finally tracked down the error in the code (it was a simple
‘fat finger’ issue where I’d entered two double quotes rather than one).
Needless to say it took an age to locate the problem. To make matters worse
I had some code below the error line that resolved the mis-matched quotes
which made locating the right line of code quite painful.

Does anyone have any hints or tips on how I can locate this sort of
problem quickly in the future? I appreciate that Freeway considers the
Action to be open ended and may not know where the error line is but I
wonder if there is a better debugging solution than manually reading
through all of the code line by line until I happen to see the error.
Thanks in advance,
Tim.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Ernie,
Thanks for the reply. I tend to use Text Wrangler as I’ve used it for years (and BBEdit before that) and although it does a good job of syntax checking most file types it doesn’t understand the hybrid format of Actions where they are part text/XML/stuff and part JavaScript.
Regards,
Tim.

On 25 Sep 2013, at 14:45, Ernie Simpson wrote:

Hey Tim, do you use any special software to write your actions?


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Tim,

I’m afraid I don’t know of any way, other than keeping track of the double quotes you’ve used. If there’s a solitary one on a line (in a regular expression, or something) adding another to the end of the line in a comment will get round the even number of quotes requirement. This doesn’t help the case of fat fingers though I’m afraid.

As for syntax highlighting in Text Wrangler, you can add .fwaction as a known suffix to the Custom Extension Mappings section of the preferences. I tend to use JavaScript highlighting. That way you’ll at least get anything in double quotes show up in a different color, which, as Ernie suggested, might make things easier to track.

Joe

On 25 Sep 2013, at 15:47, Tim Plumb email@hidden wrote:

although it does a good job of syntax checking most file types it doesn’t understand the hybrid format of Actions where they are part text/XML/stuff and part JavaScript.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for the clarification Joe. I’ve syntax highlighting turned on already but it didn’t help me (this time at least) in spotting the duplicate quotes.
Regards,
Tim.

On 25 Sep 2013, at 16:59, Joe Billings wrote:

I’m afraid I don’t know of any way, other than keeping track of the double quotes you’ve used. If there’s a solitary one on a line (in a regular expression, or something) adding another to the end of the line in a comment will get round the even number of quotes requirement. This doesn’t help the case of fat fingers though I’m afraid.

As for syntax highlighting in Text Wrangler, you can add .fwaction as a known suffix to the Custom Extension Mappings section of the preferences. I tend to use JavaScript highlighting. That way you’ll at least get anything in double quotes show up in a different color, which, as Ernie suggested, might make things easier to track.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

At 17:44 +0100 25/9/13, Tim Plumb wrote:

Thanks for the clarification Joe. I’ve syntax highlighting turned on
already but it didn’t help me (this time at least) in spotting the
duplicate quotes.
Regards,
Tim.

I have a shell script that helps to check shell scripts for such
issues. It can count the three types of quotes shells use and also
can show you the file with the non-quotes and non-brackets (etc)
removed. It’s easier to spot unbalanced quotes and brackets when the
text is missing. It has code to handle the somewhat odd syntax of
things like the case statement, and so should work with the
straightforward code of the web.

If anyone’s interested I can post it somewhere.

David


David Ledger - Freelance Unix Sysadmin in the UK.
email@hidden
www.ivdcs.co.uk


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I have come across this for completely different reasons and that was because the action bloated beyond 32k then freeway reported that the action was an unterminated action. It was quite large at around 90k so I had to split it up so parts ran at different times on the publishing cycle which was not ideal but until I was ready to compress everything down I had to keep everything long hard so watch out for that as well.
I thought textmate highlights errors with a blooming big red bar next to the offending line when there is a syntax error… I just did a quick check and yep if I add an extra " then it gives me a whopping red block next to the line here are the screen shots
https://dl.dropbox.com/u/4274685/FileChute/error-in-code.zip

theres also a Javascript validation tool as well

hope that helps
max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

ooopps I meant long hand :o)


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yeah, TextMate is my go-to coding app for just about everything. I still maintain my BBEdit license, because there are things about its find-and-replace and enormous document support that I cannot duplicate in any other app. But for day-to-day coding, TM is the tops!

Walter

On Sep 26, 2013, at 11:45 AM, max wrote:

ooopps I meant long hand :o)


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options