Asked in Computer Maintenance
How do I Stop my PC automatically restarting after an error?
Check out the following link.
If you are using Windows, then you can't stop it. Because errors that require restarting your computer are "Critical errors". In other words, the system cannot keep running because some main part has crashed