Jump to content
Ketarin forum

Wish: Pre-download command error -- abort download?


appyface
 Share

Recommended Posts

Hi Flo,

 

I have a command batch file that Ketarin executes for me, prior to downloading some apps, my "pre-processor".

 

I can make tests in the .bat file (error level and others) that can tell me if there was a problem executing the pre-processor.

 

I'd like to communicate to Ketarin that the pre-processor had an error and to NOT download but show error in the pop-up and/or log file?

 

One possible way I thought of, is to use the 'set' environment variable command during my pre-processor .bat file. If I have a place in the app to tell Ketarin to check for the existence of this environment variable (doesn't exist = no error), if it exists Ketarin could print the contents of it in the log.

 

That's just one idea on how to implement this, I'm sure there are other ways...

 

I just had a pre-processor .bat file fail on me (my fault totally) and of course Ketarin still downloaded the new file as it should have... except that I really didn't want that to happen in this case... d'oh!!!!

 

Thoughts? TIA as always for consideration of 'wishes' :)

--appyface

 

P.S. I did do a few searches and didn't come up with this as already asked or already implemented. Of course if I missed (!) please point out the posts - TIA :)

Edited by appyface
Link to comment
Share on other sites

Hi Flo,

 

Would you give example on how this would be implemented? Can this be switched on or off from the app in Ketarin?

 

I have a universal batch script and for some apps I want Ketarin to obey some sort of abort code, but for other apps I don't want Ketarin to stop. The batch script will still produce error code but Ketarin should keep going in that case.

 

Thoughts?

 

--appyface

Link to comment
Share on other sites

I think what is missing here, is an understanding of my stated objectives?

 

Maybe it would help to ask everyone to re-read what I have written above, but maybe not... maybe what I want is still not clear? (It is to me, but that's no good if you don't know too LOL.) So, I'll incorporate what I believe is being proposed with the use of exit code 0/1 inside the batch script and I'll state my objectives again... hope this is clearer...

 

Situation:

If Ketarin is about to download I have it run a universal batch script first. I'll go ahead and set exit=1 if I have some error detected inside the script. If there is no error, I will set exit=0. I think that is what Flo proposed.

 

Now, here are my objectives again:

 

1. For some apps I do want Ketarin to notice if exit=1 is set and to abort the download.

 

2. For other apps I do not want Ketarin to react if exit=1 is coming from the script, I want Ketarin to do the download anyway. This is a decision from Ketarin app, the batch script doesn't know if this time the error should be ignored.

 

#1 is addressed with setting exit code in batch script to '1' and Ketarin watching for a '1'.

 

What about #2?

 

I guess I could pass some dummy parameter from Ketarin into the batch script, and use that to ensure exit=0 so Ketarin won't react to any errors...

 

Is there a cleaner way to achieve BOTH of my objectives?

Link to comment
Share on other sites

The script I have is at the database level, to run for every app. I'd have to move the script command to each app in order to use different scripts, right?

 

Passing in a dummy parameter to the script, to tell it to output exit=0 no matter what, would be simpler if so.

 

Even simpler would be a tickmark in the app to say "ignore batch exit codes" :) but I can live with a dummy parameter.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.