Format Error Return Values

The plug-in module can return standard operating system error codes, or report its own errors, in which case it can return any positive integer. More...
Note:
When writing a file, if your plug-in module sets result to any non-zero value, then no subsequent selector calls are made by Photoshop. For example, if the formatSelectorOptionsStart handler determines that the file cannot be saved, then none of the remaining selectors are called: options, estimate, nor write.