util/stanza.lua
changeset 11089 5705d151ea11
parent 11088 5e09a3389adb
child 11090 2846b6226a8e
equal deleted inserted replaced
11088:5e09a3389adb 11089:5705d151ea11
   457 	t.attr.type = "error";
   457 	t.attr.type = "error";
   458 	local extra;
   458 	local extra;
   459 	if type(error_type) == "table" then -- an util.error or similar object
   459 	if type(error_type) == "table" then -- an util.error or similar object
   460 		if type(error_type.extra) == "table" then
   460 		if type(error_type.extra) == "table" then
   461 			extra = error_type.extra;
   461 			extra = error_type.extra;
   462 			if type(extra.by) == "string" then error_by = extra.by; end
   462 		end
   463 		end
   463 		if type(error_type.context) == "table" and type(error_type.context.by) == "string" then error_by = error_type.context.by; end
   464 		error_type, condition, error_message = error_type.type, error_type.condition, error_type.text;
   464 		error_type, condition, error_message = error_type.type, error_type.condition, error_type.text;
   465 	end
   465 	end
   466 	if t.attr.from == error_by then
   466 	if t.attr.from == error_by then
   467 		error_by = nil;
   467 		error_by = nil;
   468 	end
   468 	end