lib/nanoc3/base/source_data/item.rb in nanoc3-3.2.2 vs lib/nanoc3/base/source_data/item.rb in nanoc3-3.2.3
- old
+ new
@@ -68,9 +68,13 @@
# Parse params
params ||= {}
params = { :mtime => params } if params.is_a?(Time)
params[:binary] = false unless params.has_key?(:binary)
+ if raw_content_or_raw_filename.nil?
+ raise "attempted to create an item with no content/filename (identifier #{identifier})"
+ end
+
# Get type and raw content or raw filename
@is_binary = params[:binary]
if @is_binary
@raw_filename = raw_content_or_raw_filename
else