Ticket #1265 (new enhancement)

Opened 7 years ago

Last modified 9 months ago

Different error messages for production and development

Reported by: lyric Assigned to: demian
Priority: high Milestone: 1.1
Component: SGL Severity: open
Keywords: userfriendly error info Cc: lyric680-web@yahoo.de

Description

Depending on the current site status it should be possible to let SGL output different error info:

  • development status: detailed technical error info.
  • production status: userfriendly error info

Attachments

patch.diff (4.3 kB) - added by lyric on 10/21/06 13:15:06.
cleaner.diff (5.5 kB) - added by lyric on 04/20/07 08:19:11.

Change History

10/21/06 13:15:06 changed by lyric

  • attachment patch.diff added.

10/30/06 07:20:52 changed by demian

  • owner changed from lyric to demian.
  • status changed from new to assigned.

dude - pls assign patches to me or else they don't show up in the patch report.

11/20/06 13:12:21 changed by demian

  • cc set to lyric680-web@yahoo.de.
  • owner changed from demian to lyric.
  • status changed from assigned to new.

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.

12/10/06 19:36:13 changed by demian

  • owner changed from lyric to demian.
  • status changed from new to assigned.
  • milestone changed from 0.6.1 to 0.6.2.

12/20/06 20:58:38 changed by demian

  • owner changed from demian to lyric.
  • status changed from assigned to new.

03/22/07 06:28:39 changed by demian

  • status changed from new to closed.
  • resolution set to invalid.

until patch comes in that implements my cleaner suggestion, i think this is not something that will improve framework.

04/20/07 08:11:37 changed by lyric

  • status changed from closed to reopened.
  • resolution deleted.

I just tried to implement your cleaner suggestion. Hope it nearly meets your requirements.

04/20/07 08:19:11 changed by lyric

  • attachment cleaner.diff added.

04/20/07 08:37:49 changed by lyric

PS:

By error the file was uploaded twice.

Please ignore 'cleaner.2.diff' and if possible remove it together with this note.

Sorry!!

04/24/07 18:08:02 changed by demian

  • milestone changed from 0.6.2 to 0.6.3.

11/08/07 16:02:57 changed by demian

  • owner changed from lyric to demian.
  • status changed from reopened to new.

11/09/07 10:05:45 changed by demian

  • milestone changed from 0.6.3 to 0.9.0 - polishing.

Hi lyric - i like this better but it still needs massaging:

  • Session::get('debug') - this has been deprecated pls use this or equiv:
{if:conf[debug][sessionDebugAllowed]}
  • i didn't mention before but it's much better if keys are named, ie code is more readable

02/26/13 13:12:42 changed by demian

  • priority changed from normal to high.