From ee156cd41fbc04b5b3fab290953988f3f7b520cf Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 23 May 2019 22:34:01 +0800 Subject: concat errors object --- xmake/core/base/utils.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xmake/core/base/utils.lua') diff --git a/xmake/core/base/utils.lua b/xmake/core/base/utils.lua index f6e56b15f..bee1a2813 100644 --- a/xmake/core/base/utils.lua +++ b/xmake/core/base/utils.lua @@ -196,11 +196,16 @@ function utils.trycall(script, traceback, ...) errors = errs end if type(errors) == "table" then - setmetatable(errors, { __tostring = function (self) + setmetatable(errors, + { + __tostring = function (self) if self.errors then return self.errors end return string.serialize(self) + end, + __concat = function (self, other) + return tostring(self) .. tostring(other) end }) end -- cgit v1.3.1