When I try to export to a file that is in use, it fails (as it should) with a java.io.fileNotFoundException. What I’d like to do is catch the error and print my own message, but the error doesn’t seem to be getting caught.
fpmi.db.exportExcel("mydata.xls", 1, fpmi.db.toDataSet(ExportData))
fpmi.gui.messageBox("The file couldn't be overwritten because it is in use.")
With this code the java exception appears anyways. If I intentionally cause an exception in the try (by dividing by 0 for example), then I get the message I expect, however the java file exception never gets caught. Any ideas?