catch error when tree semicolon is missing