Exception: Wings::Valkyrie::Persister::MissingOrUnsavedFileError

Inherits:
FailedSaveError
  • Object
show all
Defined in:
lib/wings/valkyrie/persister.rb

Instance Attribute Summary

Attributes inherited from FailedSaveError

#obj

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, obj:) ⇒ MissingOrUnsavedFileError

Returns a new instance of MissingOrUnsavedFileError.



86
87
88
89
90
91
92
93
94
# File 'lib/wings/valkyrie/persister.rb', line 86

def initialize(msg = nil, obj:)
  msg = "Wings tried to save metadata for a file which has not " \
        "been saved. Fedora creates a metadata node when the file is " \
        "created, so it's not possible to add metadata for a file " \
        "until the file contents are persisted.\n  Use the " \
        "Hyrax.storage_adapter to save the file before trying to " \
        "save metadata.\n" + msg
  super(msg, obj: obj)
end