printerFile.status()
API Overview
The printerFile.status() API returns the file status code for the last operation on a printer file.
RPG Equivalent
%STATUS(FILENAME)
Contents
Return Value
The status code for the most recent operation on the file.
Examples
Manually open printer file
pjs.definePrinter("printer", { overflowIndicator: "overflow" }); try { Â printer.write(); Â } catch (error) { Â console.log(`An error occurred. Status code ${printer.status()}`); Â }