09-20-2009, 09:45 PM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Jul 2009
Location: Bristol
Posts: 8
Thanks: 0
|
passing a string to error_reporting
Hi folks
I'm playing around with some custom error handling routines, which I've wrapped in a utility class. The constructor determines if the script is executing local/live and changes the error display parameters accordingly. I've created a setter method i.e:
Code:
$obj->setErrorMode($level,$log);
The first argument is the reporting level, the second is an optional log file. My problem is that if I try and pass anything other than the integer label for the error_reporting level, be it a string or a constant, it stops the error reporting working. This in itself is not a massive problem, but makes the method a bit less user friendly.
Can anyone shed any light or give me some ideas how I could make this work (regardless of the OOP applicability in this situation)?
|
|
|
|