CMD Execption Handling C/C++

Posted by ciyo on Stack Overflow See other posts from Stack Overflow or by ciyo
Published on 2012-11-16T22:33:06Z Indexed on 2012/11/16 23:00 UTC
Read the original article Hit count: 163

Filed under:
|
|
|

I will use some CMD commands in my program and these commands might throw some exceptions. And as you know, when an exception accours, CMD writes its own error message the screen. But, I want to write my own error message.

My question is this: Is there a way to block CMD messages and write only my own error messages?

P.S. This is not a complex program. It executes CMD commands using System().

Example:

Let's say, the user can rename and copy any files in the program. As you know, if the user does not enter file's path properly, an error message is showed on the screen. And I want that this error message never appears on the screen. Only my own error message is showed.

Thank you!

© Stack Overflow or respective owner

Related posts about c++

Related posts about c