Skip to main content
4everJang
Legend
June 30, 2014
Question

Knowing result of XML export from ExtendScript

  • June 30, 2014
  • 1 reply
  • 525 views

Does anyone have experience in tracking the status messages for an XML export from within ExtendScript ? One of my scripts publishes a book and all its chapters to XML and needs to report on possible errors that occurred. The export also includes running an XSLT for post processing. I can see the status messages in the console panel but I need to know the status from within the script, so that it can handle possible error situations elegantly.

Ciao

Jang

This topic has been closed for replies.

1 reply

Participant
July 7, 2014

Hi Jang,

you can use FA_errno after your export, here is an example with an import :

    var newImport = doc.Import(textLoc, newFile, importParams, retParams); // Import graphic from picture

    if(FA_errno != 0) {

        message = "Export aborted : Unable to import file : " + newFile;

        if(FA_errno == Constants.FE_BadParameter) message += "\r\rError N° : " + FA_errno + ", Bad parameter\r\rCheck your structured applications definitions";

        else if(FA_errno == Constants.FE_SystemError) message += "\r\rError N° : " + FA_errno + ", System error\r\rCheck your permissions on folder or on files you are trying to overwrite";

        else message += "\r\rError N° : " + FA_errno;

    }

Hope it helps,

Bye