Safety critical control systems are being implemented with computers that include error recovery capabilities to reduce the effect of common mode faults triggered by harsh environments. To study the effect of the error recovery algorithms on the stability and tracking performance of the closed-loop system, this paper models the interconnection of a stochastic exosystem, error recovery logic, and nonlinear sampleddata system using a Dynamically Colored Petri Net. This representation is then mapped into a Piecewise Deterministic Markov Process representation, generalizing a recent result that did not include an error recovery algorithm. The special case of a discrete-time plant is also considered. In this case, the representation becomes simply a Markovian jump linear system.