First, a few things that should be clarified in my opinion: Did the error occur suddenly or after you did something? How old is your phone?
To me, it sounds like the well-known issue with the connector cable degrading. To my knowledge, it connects screen and digitizer to the rest of the phone and is known to cause the digitizer to go wild. The easiest and least expensive would be replacing that cable.
Sent from my HTC Vision