Closed olleolleolle closed 2 years ago
Hi @olleolleolle ,
you mean something like this:
module CamtParser
module Errors
class BaseError < StandardError; end
class NamespaceAlreadyRegistered < BaseError; end
class NotXMLError < BaseError; end
class UnsupportedParserClass < BaseError; end
class UnsupportedNamespaceError < BaseError; end
end
end
?
Yes, @tobischo!
Hi!
I was looking at the collection of errors the Errors module.
All of them inherit directly from Ruby's StandardError.
What if they inherited from a
class CamtParserError < StandardError
exception class? That way, I'd be able to catch that one, in my application code.