diff options
| author | ruki <[email protected]> | 2019-05-23 22:34:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-05-23 09:24:06 +0800 |
| commit | ee156cd41fbc04b5b3fab290953988f3f7b520cf (patch) | |
| tree | 81593e6ce5a71241e951f3c64d5a6d1a78b8e45d /xmake/core/base/utils.lua | |
| parent | 766ef3fc9af4ee410c855dd4c57618b9eda8a245 (diff) | |
concat errors object
Diffstat (limited to 'xmake/core/base/utils.lua')
| -rw-r--r-- | xmake/core/base/utils.lua | 7 |
1 files changed, 6 insertions, 1 deletions
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 |
