Skip to main content
Participating Frequently
September 1, 2006
Question

Can I redirect the stdout and stderr pipes to a file?

  • September 1, 2006
  • 3 replies
  • 856 views
Hi, All,

Glad to find that there is a specific forum to discuss InDesign Server.

I'm wondering how to redirect the stdout and stderr pipes of InDesign Server to a file. Any ideas?

Thanks very much.

Nicole
This topic has been closed for replies.

3 replies

Participating Frequently
September 26, 2006
You should be able to use try...catch blocks where you expect errors and know how to handle them and continue on. This should work just as is does for running JavaScripts against the desktop product.
Participating Frequently
September 7, 2006
Thanks Paul.

I want to handle errors in javascript, but my script always terminates when meeting errors. How can I catch errors in script without stoping it? Any tips? Thank you very much.

Nicole
Participant
December 25, 2021

Thanks for sharing this, it helped my project in js well.

The only for catching the error is latest library.

https://techgearbox.com
Participant
September 1, 2006
Hi Nicole,

If you're starting the server at the command line you can redirect the output to a file by doing this:

indesignserver.com > output.txt

On the Mac side you can redirect stdout and stderr separately:

(indesignserver > output.txt) >& error.txt

Oh, and it's also possible to get at some of the information from a script, there's an errorListErrors (JS: app.errorListErrors.item(i).listErrorMessage)

Paul