* Rework entire #2608 due to errors, memory leaks and handling
* Fix 429 'retry-after' header searching to use actual value, not 120 all the time
* General cleanup of code from #2608
General Flags: Flags that are always needed, such as warnings (-w) and directory inclusion (-J.), are added outside of the conditionals.
Debug Flags:
For DMD: When debugging is enabled (DEBUG=yes), the -debug flag for including debug code and -gs for generating standalone debug symbols are added.
For LDC or other compilers: -d-debug for debugging and -gc for generating debugging information are added similarly when debugging is enabled.
Optimization Flag:
The -O flag is only added when debugging is not enabled. This ensures that the program is compiled with optimizations only when it is not in debug mode.
General Flags: Flags that are always needed, such as warnings (-w) and directory inclusion (-J.), are added outside of the conditionals.
Debug Flags:
For DMD: When debugging is enabled (DEBUG=yes), the -debug flag for including debug code and -gs for generating standalone debug symbols are added.
For LDC or other compilers: -d-debug for debugging and -gc for generating debugging information are added similarly when debugging is enabled.
Optimization Flag:
The -O flag is only added when debugging is not enabled. This ensures that the program is compiled with optimizations only when it is not in debug mode.
* Add case statement covering ~5 years of user issues when a sqlite error has been generated, so that there is some additional information to point the user in the right direction to resolve
* Resolve issue where if ^C or something else happens, before jsonItemsToProcess is processed, ensure the database is only updated with the deltaLink post all items being processed, which included downloading of any applicable items.
* Update comments
* Add check to ensure when creating a new directory, the value passed in must not be empty
* Update logging output to be consistent with other actions
* Enhance error logging for SqliteException to include the return code in logging output to make it easier to understand why the sqlite error has occurred.