Exception: Purl::MissingRegistryInfoError

Inherits:
RegistryError show all
Defined in:
lib/purl/errors.rb

Overview

Raised when required registry information is missing

Instance Attribute Summary collapse

Attributes inherited from RegistryError

#type

Instance Method Summary collapse

Constructor Details

#initialize(message, type: nil, missing: nil) ⇒ MissingRegistryInfoError

Returns a new instance of MissingRegistryInfoError.

Parameters:

  • message (String)

    error message

  • type (String, nil) (defaults to: nil)

    PURL type

  • missing (String, nil) (defaults to: nil)

    what information is missing



109
110
111
112
# File 'lib/purl/errors.rb', line 109

def initialize(message, type: nil, missing: nil)
  super(message, type: type)
  @missing = missing
end

Instance Attribute Details

#missingString? (readonly)

Returns the missing information (e.g., “namespace”).

Returns:

  • (String, nil)

    the missing information (e.g., “namespace”)



104
105
106
# File 'lib/purl/errors.rb', line 104

def missing
  @missing
end