You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.4 KiB
50 lines
1.4 KiB
|
5 years ago
|
A FEW NOTES ON EMBEDDING BUGGRABBER IN YOUR OWN ADDON
|
||
|
|
|
||
|
|
BugGrabber will be shortened to "BG" in this document for the sake of
|
||
|
|
sanity.
|
||
|
|
|
||
|
|
1. If BG detects a standalone error catcher, the embedded BG will not
|
||
|
|
load. Examples include:
|
||
|
|
!BugGrabber, !ImprovedErrorFrame, !Swatter
|
||
|
|
|
||
|
|
2. If there are several addons present that embed BG, only the first
|
||
|
|
embedded BG will load - there's no versioning support or graceful
|
||
|
|
upgrades.
|
||
|
|
|
||
|
|
3. Embedded BGs will not save their errors to any SV, although all the
|
||
|
|
APIs should function while running. All errors will obviously be
|
||
|
|
attributed to session 1. The counter will never increment.
|
||
|
|
|
||
|
|
4. Embedded BG will not whine about missing display addons.
|
||
|
|
|
||
|
|
5. Do NOT implement the X-BugGrabber-Display TOC field if you embed
|
||
|
|
BG. It is only for full reimplementations of and alternatives for
|
||
|
|
BugSack to use.
|
||
|
|
|
||
|
|
6. Register for the callback BugGrabber_BugGrabbed, and present the
|
||
|
|
errors as you see fit.
|
||
|
|
|
||
|
|
7. If a display addon is present - there's no API yet to check whether
|
||
|
|
or not there is - you should not do /anything/ or even register for
|
||
|
|
the callbacks. For now you can use the following code to check;
|
||
|
|
|
||
|
|
local name, _, _, enabled = GetAddOnInfo("BugSack")
|
||
|
|
if name and enabled then
|
||
|
|
-- Don't do anything!
|
||
|
|
end
|
||
|
|
|
||
|
|
The above code will be changed to a BG API, like
|
||
|
|
|
||
|
|
if BugGrabber:HasDisplay() then
|
||
|
|
-- Don't do anything!
|
||
|
|
end
|
||
|
|
|
||
|
|
At a later point.
|
||
|
|
|
||
|
|
That's what I can remember for now, thanks for reading!
|
||
|
|
|
||
|
|
-- Rabbit
|
||
|
|
|
||
|
|
|
||
|
|
|