add one error handler when making tree from string