Skip to content
Snippets Groups Projects
  • Oleg Babin's avatar
    ae1bf8a4
    error: add __concat method to error object · ae1bf8a4
    Oleg Babin authored
    Usually functions return pair `nil, err` and expected that err is string.
    Let's make the behaviour of error object closer to string
    and define __concat metamethod.
    
    The case of error "error_mt.__concat(): neither of args is an error"
    is not covered by tests because of #4723
    
    Closes #4489
    
    (cherry picked from commit 935db173)
    error: add __concat method to error object
    Oleg Babin authored
    Usually functions return pair `nil, err` and expected that err is string.
    Let's make the behaviour of error object closer to string
    and define __concat metamethod.
    
    The case of error "error_mt.__concat(): neither of args is an error"
    is not covered by tests because of #4723
    
    Closes #4489
    
    (cherry picked from commit 935db173)