Open demianturner opened 11 years ago
[demian] dude - pls assign patches to me or else they don't show up in the patch report.
[demian] Hi Lyric
I like the intention of the patch, but find the argument order kind of ugly. If I send a user-friendly message it will be necessary to
{{{ SGL::raiseError('no db connection', SGL_ERROR_DBPROBS, null, false, 'can you please try later'.) }}}
I think perhaps a cleaner way would be to make the first arg optionally an array, where the 2nd key would be the user-friendly message:
{{{
SGL::raiseError(array( 'no db connection', 'you should not have clicked that'), SGL_ERROR_DBPROBS); }}}
Might be work sending to the dev list for feedback.
[demian] until patch comes in that implements my cleaner suggestion, i think this is not something that will improve framework.
[lyric] I just tried to implement your cleaner suggestion. Hope it nearly meets your requirements.
[lyric] PS:
By error the file was uploaded twice.
Please ignore 'cleaner.2.diff' and if possible remove it together with this note.
Sorry!!
[demian] Hi lyric - i like this better but it still needs massaging:
{{{ {if:conf[debug][sessionDebugAllowed]} }}}
Depending on the current site status it should be possible to let SGL output different error info: