Skip to content

Commit

Permalink
Correctly resolve addon names from error messages (#33)
Browse files Browse the repository at this point in the history
Fixes #32. Since 10.0 the error message format was slightly changed
to use "/" delimiters for path segments rather than "\".

For compatibility with Classic Era, the pattern for extracting the
addon name now accepts both delimiters.
  • Loading branch information
Meorawr authored Apr 6, 2023
1 parent 28d66be commit ab7daa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WagoAnalytics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ do
-- isSimple 3 state: True is simple, False is pcall, Nil is not simple
local function handleError(errorMessage, isSimple, errorObj)
errorMessage = tostring(errorMessage)
local wagoID = GetAddOnMetadata(match(errorMessage, "AddOns\\([^\\]+)\\") or "Unknown", "X-Wago-ID")
local wagoID = GetAddOnMetadata(match(errorMessage, "AddOns[\\/]([^\\/]+)[\\/]") or "Unknown", "X-Wago-ID")
if not wagoID or not registeredAddons[wagoID] then
return
end
Expand Down

0 comments on commit ab7daa0

Please sign in to comment.