add a new TGError class and use it to propagate location info with