lib/hybag.rb in hybag-0.0.10 vs lib/hybag.rb in hybag-0.0.11
- old
+ new
@@ -10,6 +10,18 @@
module Hybag
def self.ingest(bag)
Hybag::Ingester.new(bag).ingest
end
+
+ # Error Classes
+ class UndiscoverableModelName < StandardError
+ def initialize(bag)
+ super("Unable to determine model from bag at #{bag.bag_dir}")
+ end
+ end
+ class InvalidBaggable < StandardError
+ def initialize(object)
+ super("#{object} requested to be bagged, but it is invalid")
+ end
+ end
end