Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to catch/rescue exception from Xlsxir.stream_list #92

Open
benschenker opened this issue Feb 25, 2019 · 1 comment
Open

Unable to catch/rescue exception from Xlsxir.stream_list #92

benschenker opened this issue Feb 25, 2019 · 1 comment

Comments

@benschenker
Copy link

I have an excel file with some bad data that crashes Xlsxir.stream_list in an uncatchable way.
Example: run mix test on https://github.com/benschenker/brokelixir

It fails with:

10:20:17.303 [error] Process #PID<0.195.0> raised an exception
** (RuntimeError) Unknown cell attribute
    (xlsxir) lib/xlsxir/parse_worksheet.ex:73: anonymous fn/2 in Xlsxir.ParseWorksheet.sax_event_handler/4
    (elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2
    (xlsxir) lib/xlsxir/parse_worksheet.ex:68: Xlsxir.ParseWorksheet.sax_event_handler/4
    (erlsom) 

even though the call is wrapped in a try/rescue block, I have also tried catching :exit to no avail.

I'd love to put up a pr to fix this but after poking around a bit it feels like I may need a bit of guidance. Any assistance is appreciated.

@dbernheisel
Copy link
Contributor

dbernheisel commented Mar 6, 2020

I ran into this too, and it's a problem that Xlsir is spawning an unmonitored process that can throw exceptions like this, which never recover since it's not linked. That needs to be fixed.

In the meantime, I have removed that exception from occurring in #98 so at least it avoids the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants