Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Owl_io.head: avoid log message about assertion failure on large CSV file
Executing `Owl_dataframe.of_csv "large.csv"` prints: ``` 2023-04-13 14:01:52.922 WARN : Owl_io.head: ignored exception File "src/base/misc/owl_io.ml", line 138, characters 9-15: Assertion failed ``` Using assertions for control-flow (early exit of loop) seems wrong, and causes log messages to be shown on the console. Raise an [End_of_file] exception instead which will be handled by the iteration function just as if the file ended early. Use [raise_notrace] because the exception is immediately caught and we don't need a backtrace. Signed-off-by: Edwin Török <[email protected]>
- Loading branch information