handle format strings like [name]+'\n '+[ele], and catch errors