My intention is to simplify our error handling. Sometimes I throw severe PEAR::Errors which must be logged and sometimes I throw less important errors, let's call them "warnings".
How can I differ between warnings and errors? Both are thrown using
return PEAR::raiseError("errormassage", MYCODECONSTANT);
Am I forced to define errorcode ranges in order to check how important an error is? For example: All error codes from -1000 to -1999 would be warnings an all above would be "real" errors. I don't like this solution too much so maybe someone could give me a more sophisticated suggestion?
thanx
Sebastian