How can I cause program to crash and print an error message?
I made a class and I need to be able to crash the program and print an error message if a certain condition is met inside the default constructor.
Something like this inside the default constructor:
1 2 3 4
|
if(condition){
//crash program
//print error message explaining why program crashed
}
|
What would be the most elegant way to do this?
Topic archived. No new replies allowed.