Sha256: 519646258e68e4dbb08e6ca7413d787864569287a2901486f430997b8a06c0a0
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
# frozen_string_literal: true module RASN1 # Base error class class Error < StandardError; end # ASN.1 encoding/decoding error class ASN1Error < Error; end # ASN.1 class error class ClassError < Error # @return [String] def message "Tag class should be a symbol among: #{Types::Base::CLASSES.keys.join(', ')}" end end # Enumerated error class EnumeratedError < Error; end # CHOICE error: #chosen not set class ChoiceError < RASN1::Error # @param [Types::Base] object def initialize(object) @object = object super() end def message "CHOICE #{@object.name}: #chosen not set" end end # Exception raised when a constraint is not verified on a constrained type. # @version 0.11.0 # @author Sylvain Daubert class ConstraintError < Error # @param [Types::Base] object def initialize(object) @object = object super() end # @return [String] def message "Constraint not verified on #{@object.inspect}" end end # Exception raised when model validation fails # @since 0.12.0 class ModelValidationError < Error end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rasn1-0.12.0 | lib/rasn1/errors.rb |