Permalink
Browse files

Give a more descriptive error messsage when someone tries to write an…

… object of an unsupported class.
  • Loading branch information...
1 parent 765b7dc commit 4abf548d599abe6a2a45f169a8f5ca7b15f96e97 @ananelson ananelson committed Mar 21, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/row.rb
View
@@ -148,7 +148,7 @@ def write(col, label, style)
when ExcelFormula
@cells << FormulaCell.new(self, col, style_index, label)
else
- raise label.class.name
+ raise "You are trying to write an object of class #{label.class.name} to a spreadsheet. Please convert this to a supported class such as String."
end
end

0 comments on commit 4abf548

Please sign in to comment.