In my program I pass an argument from console and save it to a variable. Let's say
const string FileName= argv[1];
If there is no argument passing I get this
terminate called throwing an exception
How can I catch an exception and show proper error to user that there is no arguments passed?