Exception: Purl::UnsupportedTypeError

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

Overview

Raised when trying to generate registry URLs for unsupported types

Instance Attribute Summary collapse

Attributes inherited from RegistryError

#type

Instance Method Summary collapse

Constructor Details

#initialize(message, type: nil, supported_types: []) ⇒ UnsupportedTypeError

Returns a new instance of UnsupportedTypeError.

Parameters:

  • message (String)

    error message

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

    unsupported type

  • supported_types (Array<String>) (defaults to: [])

    list of supported types



95
96
97
98
# File 'lib/purl/errors.rb', line 95

def initialize(message, type: nil, supported_types: [])
  super(message, type: type)
  @supported_types = supported_types
end

Instance Attribute Details

#supported_typesArray<String> (readonly)

Returns list of supported types.

Returns:

  • (Array<String>)

    list of supported types



90
91
92
# File 'lib/purl/errors.rb', line 90

def supported_types
  @supported_types
end