32 virtual ~WvErrorBase();
40 {
return errnum == 0; }
69 void seterr(WvStringParm specialerr);
70 void seterr(WVSTRING_FORMAT_DECL)
72 void seterr_both(
int _errnum, WvStringParm specialerr);
73 void seterr_both(
int _errnum, WVSTRING_FORMAT_DECL)
74 { seterr_both(_errnum,
WvString(WVSTRING_FORMAT_CALL)); }
75 void seterr(
const WvErrorBase &err);
79 { errnum = 0; errstring = WvString::null; }
99 void set(WvStringParm specialerr)
101 void set(WVSTRING_FORMAT_DECL)
102 {
seterr(WvString(WVSTRING_FORMAT_CALL)); }
103 void set_both(
int _errnum, WvStringParm specialerr)
104 { seterr_both(_errnum, specialerr); }
105 void set(
const WvErrorBase &err)
A class for managing error numbers and strings.
static WvString strerror(int errnum)
A replacement for the operating system strerror() function that can map more kinds of error strings (...
void noerr()
Reset our error state - there's no error condition anymore.
virtual bool isok() const
By default, returns true if geterr() == 0.
virtual void seterr(int _errnum)
Set the errnum variable – we have an error.
virtual void seterr(int _errnum)
Set the errnum variable – we have an error.
virtual int geterr() const
If isok() is false, return the system error number corresponding to the error, -1 for a special error...
A variant of WvErrorBase suitable for embedding as a member of your own object, preferably called 'er...
WvString is an implementation of a simple and efficient printable-string class.