changeset 43:00c2282f073a v1.0beta0

More fancy errors !
author contrebasse
date Sat, 30 Apr 2011 00:07:41 +0200
parents d74613eb5f72
children cefa203e2e51
files ReagentMaker.lua utils.lua
diffstat 2 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ReagentMaker.lua	Sat Apr 30 00:02:55 2011 +0200
+++ b/ReagentMaker.lua	Sat Apr 30 00:07:41 2011 +0200
@@ -205,20 +205,16 @@
 	btn.textureHighlight:Show()
 
 	-- Tooltips
-	local link
-	if A.data[reagentID].spellLink then
-		link = A.data[reagentID].spellLink
-	else
-		A.DEBUG("Recipe link not found for "..reagentID)
-		return
-	end
-
+	local link = A.data[reagentID].spellLink
 	if link then
 		A.tooltipRecipe:SetOwner(btn)
 		A.tooltipRecipe:SetHyperlink(link)
 		A.tooltipRecipe:Show()
 		A.tooltipRecipe:ClearAllPoints()
 		A.tooltipRecipe:SetPoint("BOTTOMLEFT",GameTooltip,"BOTTOMRIGHT")
+	else
+		-- Shouldn't happend, but just in case...
+		A.Error("Recipe link not found for "..reagentID)
 	end
 end
 
--- a/utils.lua	Sat Apr 30 00:02:55 2011 +0200
+++ b/utils.lua	Sat Apr 30 00:07:41 2011 +0200
@@ -67,7 +67,7 @@
 				end -- if
 			end -- if
 		end -- for
-		A.DEBUG("Tradeskill not found for "..itemID)
+		A.Error("Tradeskill not found for "..itemID..", is the recipe hidden ?")
 	end -- function
 end -- do