Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: use bridgeTalk with onError event, exception handling

$
0
0

Hi all,

 

I found this solution if it can be helpfull for someone.

But I don't know if it is the better way. I'm not abable to run a new exception in the onResult function.

 

 

function save_to_PSD(obj){    var error = null;    var bt = new BridgeTalk();     bt.target = "photoshop";     bt.body = save_to_psd_function.toSource()+"("+obj.toSource()+");";     bt.onError = function(ex){        error = ex.body     }     bt.send(100);     if(error != null){        throw new Error(error);     }
}

Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>