fast_excel
fast_excel copied to clipboard
Revise NULL pointers that are returned intentionally?
See Note number 1 of https://github.com/Paxa/fast_excel/pull/83.
There are cases where Libxlsxwriter returns a NULL pointer intentionally (rather than because of a memory error).
In those cases, I think FastExcel should return nil instead of a Struct of null pointer, especially because further usage on the Struct is likely to yield segmentation fault error and crashes the whole process (rather than just a Ruby RuntimeError when using nil values improperly).
For example:
WorkbookWrappers#get_worksheet_by_namewhen worksheet is not foundWorkbookWrappers#default_formatwhen there are no formats?WorksheetWrappers#find_rowwhen row is not found?