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

Optional errors #71

Open
ExplosiveGM opened this issue Jun 7, 2021 · 1 comment
Open

Optional errors #71

ExplosiveGM opened this issue Jun 7, 2021 · 1 comment

Comments

@ExplosiveGM
Copy link

I need parse some invalid files. Now i hack it this way:

module Saxerator
  module Adapters
    class Ox
      def error(message, _, _)
        # raise Saxerator::ParseException, message
      end
    end
  end
end

Can you add option ignore_errors?

def error(message, _, _)
  return if ignore_errors
  raise Saxerator::ParseException, message
end
@soulcutter
Copy link
Owner

Your hack is pretty good! My reservation about adding that as configuration is whether or not it's supportable in every adapter. If you submit this as a PR I would be interested in accepting that change.

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