May 27, 2008 at 9:53 pm
#3394
gnustavo
Participant
For the ones who would be interested to make the life easier here is the code of a little and simple header – include it in your program if you want to use GERR. Filename is “hdegerr”.I’d like to hear your opinion about this idea,if it good or not. If there are any questions or suggestions – i’m ready for discussion, we can make it better anytime. That is an open concept.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | hdegerr<br /> // HDE General Error header for C++ programs<br /> const int GERR= 1;// General Error<br /> int SPERR = 0;// Special error - that means we know what error that is<br /> int PRSTAT= 1;// Program status. By default error.<br /> // There are endlessly a lot errors but only<br /> // one right result.<br /> <br /> // Perhaps there will be one days well-known<br /> // error codes like there are already<br /> // well-known port numbers.<br /> // Well-known error code 0: OK. The first<br /> // well-known error code at all.<br /> // Well-known eror code 1: General Error.<br /> // Normally when something unexpected happens<br /> // in a program it is an error.<br /> // We catch all unexpected errors with<br /> // General Error. |