** Exception output when inputting / outputting files ** It is natural to catch an exception when inputting / outputting a file, and the file remains open unless the process of closing the file that is finally open is inserted. ** Backup when overwriting files ** When overwriting a file from scratch, if an exception occurs while writing the file, the data inside will be lost. Therefore, make a backup in advance and then start overwriting, and if it fails, restore it with a backup. When the writing is completed normally, the backup is deleted. It is dangerous if the above processing is not included. ** Error display and number ** For error display, set an error ID and display the error based on the set ID. The error IDs in the 400s are grouped by type, such as errors related to file output. ** Data format to hold as a variable ** It has a general data format. If it is saved in a special format, only the data value is retained. Example: Data [4000] [50000] → Holds 4000 and 50000 ** Class name and method name ** Basically, to provide only the name function. ** Return route after exception ** Even if an exception occurs, do not cause a forced termination. For example, if an exception occurs somewhere in the program, let's jump to the return route after performing all the regular processing and terminate the program safely.
ʻSince I've just become an IT warrior, I'm very welcome to point out things like" Isn't this different? " ``
Recommended Posts