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); }
}