From what you said they person stopped as soon as they realized it was grave matter…so it would seem that they would not then have a committed mortal (grave) sin.
For one needs all three aspects for a mortal sin. Now…of course one does not have to “call it” grave matter or mortal sin… to know it is serious…like if the say the person was in the middle of* murder* and they thought “this is grave matter…or this is mortal sin…” then I would question if they had the needed knowledge already …I think you get my point here.
Compendium of the Catechism of the Catholic Church (issued by Pope Benedict XVI)
- When does one commit a mortal sin?
1855-1861
1874
One commits a mortal sin when there are simultaneously present: grave matter, full knowledge, and deliberate consent. This sin destroys charity in us, deprives us of sanctifying grace, and, if unrepented, leads us to the eternal death of hell. It can be forgiven in the ordinary way by means of the sacraments of Baptism and of Penance or Reconciliation.
- When does one commit a venial sin?
1862-1864
1875
One commits a venial sin, which is essentially different from a mortal sin, when the matter involved is less serious or, even if it is grave, when full knowledge or complete consent are absent. Venial sin does not break the covenant with God but it weakens charity and manifests a disordered affection for created goods. It impedes the progress of a soul in the exercise of the virtues and in the practice of moral good. It merits temporal punishment which purifies.