catch xtemplate compiler error