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.
28 lines
632 B
28 lines
632 B
do
|
|
local _detalhes = _G.Details
|
|
local addonName, Details222 = ...
|
|
|
|
local _error = {
|
|
["error"] = true,
|
|
["errortext"] = ""
|
|
}
|
|
_error.__index = _error
|
|
_error.__newindex = function()
|
|
assert(false, "Attempt to modify an read-only object.\nUse object() or object.errortext\n"..debugstack (2, 1 , 0))
|
|
return
|
|
end
|
|
_error.__tostring = function()
|
|
return _error.errortext
|
|
end
|
|
_error.__call = function(_this)
|
|
print(_this.errortext)
|
|
end
|
|
|
|
function _detalhes:NewError (_msg)
|
|
local this_error = {}
|
|
this_error.errortext = _msg
|
|
setmetatable(this_error, _error)
|
|
return this_error
|
|
end
|
|
|
|
end
|
|
|