Home Forums Re: General Error concept

#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.

hdegerr
// HDE General Error header for C++ programs
const int GERR= 1;// General Error
int SPERR = 0;// Special error - that means we know what error that is
int PRSTAT= 1;// Program status. By default error.
// There are endlessly a lot errors but only
// one right result.

// Perhaps there will be one days well-known
// error codes like there are already
// well-known port numbers.
// Well-known error code 0: OK. The first
// well-known error code at all.
// Well-known eror code 1: General Error.
// Normally when something unexpected happens
// in a program it is an error.
// We catch all unexpected errors with
// General Error.