box: always promote error created via box.error() to diag
This patch makes box.error() always promote error to the diagnostic area despite of passed arguments. Closes #4829 @TarantoolBot document Title: always promote error created via box.error() to diag box.error() is able to accept two types of argument: either pair of code and reason (box.error{code = 555, reason = 'Arbitrary message'}) or error object (box.error(err)). In the first case error is promoted to diagnostic area, meanwhile in the latter - it is not: ``` e1 = box.error.new({code = 111, reason = "cause"}) box.error({code = 111, reason = "err"}) - error: err box.error.last() - err box.error(e1) - error: cause box.error.last() - err ``` From now box.error(e1) sets error to diagnostic area as well: ``` box.error(e1) - error: cause box.error.last() - cause ```
Please register or sign in to comment